Robot arm with adaptive three-dimensional boundary in free-drive

ABSTRACT

The invention relates to a robot controller controlling a robot arm, the robot controller is configured to maintain the robot arm in a static posture when only gravity is acting on the robot arm and allow change in posture of the robot arm 5 when an external force different from gravity is applied to the robot arm. The free-drive mode of operation is activatable by a user establishing a free-drive activation signal to the robot controller, which in free-drive mode of operation is configured within at a free-drive safety period to allow a part of said robot arm to be moved within a virtual three-dimensional geometric shape 10 surrounding the part of the robot arm.

FIELD OF THE INVENTION

The present invention relates to a robot arm having a robot controllercontrolling a plurality of robot joints of the robot arm connecting arobot base and a robot tool flange, where the robot joints of the robotarm can be manually manipulated by a user in a so call free-drive mode.

BACKGROUND OF THE INVENTION

Robot arms comprising a plurality of robot joints and links where motorsor actuators can move part of the robot arm in relation to each otherare known in the field of robotics. Typically, the robot arm comprises arobot base which serves as a mounting base for the robot arm; and arobot tool flange where to various tools can be attached. A robotcontroller is configured to control the robot joints in order to movethe robot tool flange in relation to the base. For instance, in order toinstruct the robot arm to carry out a number of working instructions.The robot joints may be rotational robot joints configured to rotateparts of the robot arm in relation to each other, prismatic jointsconfigured to translate parts of the robot arm in relation to each otherand/or any other kind of robot joints configured to move parts of therobot arm in relation to each other.

Typically, the robot controller is configured to control the robotjoints based on a dynamic model of the robot arm, where the dynamicmodel defines a relationship between the forces acting on the robot armand the resulting accelerations of the robot arm. Often, the dynamicmodel comprises a kinematic model of the robot arm, knowledge aboutinertia of the robot arm and other parameters influencing the movementsof the robot arm. The kinematic model defines a relationship between thedifferent parts of the robot arm and may comprise information of therobot arm such as, length, size of the joints and links and can forinstance be described by Denavit-Hartenberg parameters or like. Thedynamic model makes it possible for the controller to determine whichtorques and/or forces the joint motors or actuators shall provide inorder to move the robot joints for instance at specified velocity,acceleration or in order to hold the robot arm in a static posture.

Robot arms need to be programmed by a user or a robot integrator whichdefines various instructions for the robot arm, such as predefinedmoving patterns and working instructions such as gripping, waiting,releasing, screwing instructions. The instruction can be based onvarious sensors or input signals which typically provide a triggeringsignal used to stop or start at a given instruction. The triggeringsignals can be provided by various indicators, such as safety curtains,vision systems, position indicators, etc.

Typically, it is possible to attach various end effectors to the robottool flange or other parts of the robot arm, such as grippers, vacuumgrippers, magnetic grippers, screwing machines, welding equipment,dispensing systems, visual systems, etc. When providing such endeffector, it is necessary to provide an estimation of the payloadinformation that such end effector provides to the robot arm. Typically,the user manually enters the payload information into the kinematicmodel where after the controller can take the payload information intoaccount when controlling the robot. Typically, the payload informationcomprises information in relation to the weight and pose of the object,where pose of the object relates to the position and orientation of theobject in relation to the robot arm e.g. the robot tool flange. The posecan for instance be indicated as the position of the center of mass ofthe object in relation to the robot tool flange. Many users havedifficulties setting the correct payload information or ignore/forget toset it at all.

Many robot arms can be set into a so call free-drive or Zero G mode ofoperation, where a user manually can change the posture of the robot armby pushing or pulling the robot arm and where the robot controller isconfigured to hold the robot arm in a posture when a user is not pushingor pulling the robot arm. In the free-drive mode of operation, the robotcontroller is configured to control the motor torque provided by themotor of the robot joints based on joint encoders and a dynamic model ofthe robot. Typically, the joint encoders provide a signal indicating thejoint angle of each of the joints and the controller can based on thejoint angles and a dynamic model of the robot calculate the force/torqueneeded to maintain the robot arm in a posture. When a user pushes orpulls the robot arm a change in joint angle can be registered and therobot controller is configured to allow movement of the robot. In someembodiment the controller can be configured to apply a motor torque tothe joint motors when a change in joint angle is registered for instancein order to assist movement of the robot arm, apply some resistance thatthe user need to overcome in order to change the posture of the robotarm. Some robot arms comprise torque sensors configured to indicate thetorque applied to each of the robot joints and the robot controller canbe configured to control the motor torques applied to the robot jointsbased on the torques applied to the robot joint.

The known free-drive modes require manipulation of the individual robotjoints in order for the robot arm to change posture which in somesituations may be difficult, for instance at work stations where a partof the robot arm is put behind a shield preventing a user from rotatingsome of the robot joints.

U.S. Pat. No. 6,212,433B1 discloses a direct teaching apparatus whichallows an operator to perform the direct teaching of a robot in safety.The apparatus includes a force detector and a teaching tool. The toolincludes a working tool or handle fixed to the first detector and heldby the operator to lead the robot. It also includes a device forcomputing the position or speed directive based on the force detectordata and a motion model. It further includes a device for computing thegeneration torque of a motor for driving a robot depending on theposition or speed directive and a controller to control the generatedtorque. The user needs to configure an provide the teaching apparatus tothe robot system which complicates the usage of the teaching apparatusand further the user can only move the robot arm from the teachingapparatus.

US 2012/130541 discloses a method and apparatus for the direct and safeteaching of a robot. The apparatus consists of a plurality of tactilesensors and electronic circuitry encapsulated in a compact enclosure,and a handle protruding from the enclosure. The handle provides an easymeans for an operator to apply an external force and to act on thesensors that generate electronic signals to the robot controller. Theuser needs to configure an provide the handle apparatus to the robotsystem which complicates the usage of the handle apparatus as the axisof the handle apparatus need to be linked to specified joints andfurther the user can only move the robot arm using the handle apparatus.

Safe operation of the robot arm in free-drive mode requires correctspecification of e.g. weight of the payload to the robot controller, toavoid hazardous situations upon activation of the free-drive mode.Further, it is a known problem that sensors used e.g. in determinationof the weight of payload drifts over time leading to a wrong payloadweight calculation made by the robot controller and potential hazardoussituations. Hence hazardous situations may occur if e.g. the forceneeded to maintain the robot arm in a given posture is based on a wrongcalculation of payload weight.

SUMMARY OF THE INVENTION

The object of the present invention is to address the above describedlimitations with the prior art or other problems of the prior art. Thisis achieved by a robot controller, a robot and a method according to afirst aspect, a second and/or a third aspect of the present invention,where various embodiments of the first aspect, the second aspect and thethird aspect of the invention the following paragraphs.

First Aspect of the Invention

This is achieved by a robot controller, robot arm and method accordingto a first aspect of the present invention, where a robot controller forcontrolling a robot arm is switchable from a current mode of operationinto a free-drive mode of operation where the robot controller in thefree-drive mode of operation is configured to:

-   -   maintain the robot arm in a static posture when only gravity is        acting on the robot arm;    -   allow change in posture of the robot arm when an external force        different from gravity is applied to the robot arm;        wherein the free-drive mode of operation is activatable by a        user establishing a free-drive activation signal to the robot        controller, wherein the robot controller upon receiving the        free-drive activation signal is configured to initiate a        free-drive mode activation sequence comprising the steps of:    -   in a predetermined activation sequence period of time monitor a        value of at least one joint sensor parameter, and    -   compare the value of the at least one joint sensor parameter to        at least one free-drive activation joint sensor parameter        threshold value;        wherein the robot controller is configured to switch to the        free-drive mode of operation if the value of the at least one        joint sensor parameter does not exceed the at least one        free-drive activation joint sensor parameter threshold value        within the predetermined activation sequence period of time.

Defining an activation sequence period of time (also sometimes referredto as time window) within which defined joint sensor parameter value iscompared to a threshold is advantageous in that it has the effect, thatjoint sensor parameters not intended to activate free-drive is sortedout. Hereby is ensured that a collision or random bump into the robotarm, its tool or payload does not activate the free-drive mode. Further,this is advantageous in that it has the effect that entering thefree-drive mode is not possible if the measured value exceeded therelated threshold value within the defined time period. By establishingthis activation sequence period of time is established an intermediatefree-drive mode test period of time which is advantageous in that it hasthe effect that unexpected movement of the robot arm due to e.g. wronginput of payload weight to the robot controller is prevented or at leastreduced by the free-drive activation joint sensor parameter thresholdvalues. The activation joint sensor parameter threshold value can be anykind of value suitable for defining a threshold, such as maximum values,minimum values, specific values, ranges of values, limits of values etc.That a joint sensor parameter does not exceeds the joint sensorparameter threshold value means that the value of the joint sensorparameter is within or does not violate an allowed value as defined bythe threshold value. For instance, in case of a maximum threshold valuethe joint sensor parameter does not exceed the joint sensor parameterthreshold value if the value of the joint sensor parameter is smallerthan the joint sensor parameter threshold value. Also, in case of aminimum threshold value the joint sensor parameter does not exceed thejoint sensor parameter threshold value if the value of the joint sensorparameter is larger than the joint sensor parameter threshold value.Also, in case of a range of threshold values the joint sensor parameterdoes not exceed the joint sensor parameter threshold value if the valueof the joint sensor parameter is larger than a lower joint sensorparameter threshold value and smaller than an upper joint sensorparameter threshold value. Accordingly, when free-drive mode isactivated by a user within range of the robot arm, wrong payload weightwill not cause the robot arm to move in an unpredicted direction andthereby possibly create a hazardous situation for the user. Movement ofthe robot arm will be stopped if a monitored joint sensor parametervalue exceeds a related threshold value.

After the activation sequence the controller can enter free drive modeof operation where less restrict safety requirements can be allowed,which results in a more user-friendly free drive mode of operation.

According to an embodiment of the invention, the robot controller isconfigured to stay in the current mode of operation if the value of theat least one joint sensor parameter does exceed the at least onefree-drive activation joint sensor parameter threshold value within thepredetermined activation sequence period of time. This result in theeffect that the robot does not enter a safety stop in case the freedrive mode of operation is not activated. This is time saving for theuser, as the robot arm does not need to be restarted and/or reactivateddue to safety stops. In an embodiment, the user is informed of whichjoint sensor parameter(s) preventing the entering of the robot arm intothe free-drive mode of operation via a user interface. This has theeffect, that the user fast and efficiently can remove the obstacle andthen subsequently try activating the free-drive mode of operation again.

According to an embodiment of the invention, the predeterminedactivation sequence period of time is at least any one of the followingperiods of time: 5 seconds, 3 seconds, 2 seconds, 1 second, ½ second and¼ second. This is advantageous in that it has the effect, that the robotarm will enter the free-drive mode activation sequence period for atleast a predetermined period of time of at least 5 seconds, 3 seconds, 2seconds, 1 second, ½ second or ¼ second and not enter free-drive modedirectly risking hazardous situations due to e.g. a wrong payloadweight. Further it can be ensured that the at least one joint sensorparameter does not exceed the at least one free-drive activation jointsensor parameter threshold value for at least a predefined period oftime providing a safer activation of free drive mode of operation.

According to an embodiment of the invention, the predeterminedactivation sequence period of time is at most any one of the followingperiods of time: 5 seconds, 3 seconds, 2 seconds, 1 second, ½ second and¼ second. This is advantageous in that it has the effect, that the robotarm will only enter the free-drive mode activation sequence period forat most a predetermined period of time of at most 5 seconds, 3 seconds,2 seconds, 1 second, ½ second or ¼ second, hereby it is avoided that therobot arm stay in the activation sequence for an unknown period of timewhich can be annoying to a user. This can be avoided by configuring therobot controller to exit the activation sequence period when the maximumperiod of time has expired. For instance, if during the activationsequence period it has not been possible to determine if the at leastone joint sensor parameter does not exceed the at least one free-driveactivation joint sensor parameter threshold value, the robot controllercan be configured not to the enter free drive mode of operation.

Consequently, the activation sequence period of time can be executed inany one of the following periods of time after the free drive activationsignal have been received: 0-¼ second; 0-½ second; 0-1 second; 0-2seconds; 0-3 seconds; 0-5 second; ¼-½ second; ¼-1 second; ¼-2 seconds;¼-3 seconds; ¼-5 seconds; ½-1 second; ½-2 seconds; ½-3 seconds; ½-5seconds; 1-2 seconds; 1-3 seconds; 1-5 seconds; 2-3 seconds; 2-5seconds; 3-5 seconds; or any one of the following fixed period of time:¼ second; ½ second; 1 second; 2 seconds, 3 seconds or 5 seconds. Thismakes it possible to provide an activation sequence period which ensuresthat proper verification that the robot arm can be switch intofree-drive mode of operations and at the same time prevents annoying theuser too much with waiting time.

According to an embodiment of the invention, the robot controller isconfigured for initiating the free-drive mode activation sequence uponreceiving the free-drive activation signal for an activation period oftime. This is advantageous in that it has the effect, that onlyintentional established free-drive signals are used to enter theactivation sequence. For instance, the robot controller can beconfigured to enter the activation sequence upon continuously receivingthe free-drive activation signal for the activation period of time. Analternative way of identifying an intentional free-drive activationsignal is if the activation free-drive activation signal is received bythe robot controller in a predetermined sequence or pattern e.g. ofdiscrete signals.

According to an embodiment of the invention, the predeterminedactivation period of time is at least any one of the following periodsof time: 5 seconds, 3 seconds, 2 seconds, 1 second, ½ second and ¼second. This is advantageous in that it has the effect, that the robotarm will enter the free-drive mode activation sequence when the robotcontroller has received the free-drive activation signal for at least apredetermined period of time of at least 5 seconds, 3 seconds, 2seconds, 1 second, ½ second or ¼ second. This makes it possible toprovide a more robust registration of an actual user's intention toactivate the free-drive mode activation sequence, as eventual free-driveactivation signals generated unintentionally can be sorted out byensuring the free-drive activation signal is received during thepredetermined activation period of time.

According to an embodiment of the invention, the predeterminedactivation period of time is at most any one of the following periods oftime: 5 seconds, 3 seconds, 2 seconds, 1 second, ½ second and ¼ second.This makes it possible to provide a user-friendly registration of anuser's intention to activate the free-drive mode activation sequence, asthe waiting time for the user generating the free-drive activationsignal can be specified to a specific period of time and the user willthus know how long time is needed in order to enter free-drive mode ofoperation.

Consequently, the activation period of time can be executed in any oneof the following periods of time after the initial receipt of the freedrive activation: 0-¼ second; 0-½ second; 0-1 second; 0-2 seconds; 0-3seconds; 0-5 seconds; ¼-½ second; ¼-1 second; ¼-2 seconds; ¼-3 seconds;¼-5 seconds; ½-1 second; ½-2 seconds; ½-3 seconds; ½-5 seconds; 1-2seconds; 1-3 seconds; 1-5 seconds; 2-3 seconds; 2-5 seconds; 3-5seconds; or any one of the following fixed period of time: ¼ second; ½second; 1 second; 2 seconds, 3 seconds or 5 seconds.

According to an embodiment of the invention, the robot controller isconfigured for maintaining the robot arm in the free-drive mode ofoperation for at least a predetermined free-drive period of time. Thepredetermined free-drive period of time is a period of time in which therobot controller maintains the robot arm in the free-drive mode ofoperation after the robot controller have switch to the free-drive modeof operation. This ensures that the user after activation of thefree-drive mode of operation has some time to initiate movement of therobot arm.

According to an embodiment of the invention, the robot controller isfurthermore configured for starting a predetermined restart free-driveperiod of time when the robot arm is in a static posture. Thepredetermined restart free-drive period of time is a period of timestarting when the robot arm has been arranged in the static posture, forinstance when a user has stopped moving the robot arm and thus does notapply a force or a torque to the robot arm. This ensures that the userafter having move the robot arm in the free-drive mode of operation hassome time to re-start movement of the robot arm, for instance in orderto allow the user to change grip of the robot arm or in order to store awaypoint. Additionally, or alternatively the static posture can beinitiated when an external force or torque impact on the robot armterminates.

According to an embodiment of the invention, the robot controller isconfigured to leave the free-drive mode of operation when the robot armhas been kept in a static posture within the predetermined free-driveperiod of time or within the predetermined restart free-drive period oftime. The predetermined free-drive period of time and the predeterminedrestart free-drive period of time can be the same and upon expiryhereof, the robot controller leaves the free-drive mode of operation.

Hence in practice, the period of time the robot arm is maintained in thefree-drive mode is reset when the user starts moving the joints of therobot arm by applying force/torque. After a period of time (restartfree-drive period) starting when the user stops applying a force/torque,the mode of operation will switch to another mode of operation such ateach mode, run mode, stop mode, etc. This is advantageous in that ithas the effect, that the user can maintain the robot arm in free-drivemode of operation for as long time as needed by applying a force to therobot arm before expiry of the restart period of time. This allows theuser to change his/her grip of the robot arm which in some situation canbe desired by the user changing posture of the robot arm in free-drivemode of operation. Further, the user can make the robot controller leavethe free-drive mode of operation simply by not applying a force/torquefor a period of time defined by the restart period of time. Further, atleast in relation to safety (person and mechanic), this is advantageousin that the robot is not maintained in the free-drive mode of operationwhere drifting of sensors over time otherwise could lead to change ofposture of the robot. Such drifting could ultimately result in acollision of payload or robot tool with floor or other objects withinrange of the robot arm. Furthermore maintaining the robot arm infree-drive mode of operation after a user have left the robot arm mayalso lead to hazards situations in case another user approaches therobot arm unaware of the fact that the robot arm is in free-drive modeof operation, as an user expects a stationary robot arm to be in astop/brake mode of operation where the robot arm cannot move.

According to an embodiment of the invention the predetermined free-driveperiod of time and/or the predetermined restart free-drive period oftime is at least 2 seconds allowing a user to change her/his grip of therobot arm and initiate/re-initiate movement of the robot arm before thefree-drive period of time and/or the predetermined restart free-driveperiod expires. However, it is to be understood that the predeterminedfree-drive period of time and/or the predetermined restart free-driveperiod of time alternatively can be at least any one of the followingperiods of time of 10 second, 5 seconds, 3 seconds. Periods of 5-10seconds will allow the user to perform additional tasks such asregistering of waypoints, moving external objects, adjusting toolsmounted to the robot arm before the robot arm exits the free-drive modeof operation.

According to an embodiment of the invention the predetermined free-driveperiod of time and/or the predetermined restart free-drive period oftime is at most 5 seconds preventing that a user unintentionally canmove the robot arm after having left the robot arm alone for a period of5 seconds. This reduces the risk of hazardous situations as describeabove. However, it is to be understood that the predetermined free-driveperiod of time and/or the predetermined restart free-drive period oftime alternatively can be at most any one of the following periods oftime of 10 seconds, 15 seconds, 20 seconds, 30 seconds. Periods of 5-30seconds will allow the user to perform additional tasks such asregistering of waypoints, moving external objects, adjusting toolsmounted to the robot arm before the robot arm exits the free-drive modeof operation, while the risk of unintentional movements of the robot armare still kept at an acceptable level, as a user seldom forgets that therobot arm is in free-drive mode of operation within periods of thesetimes. Further, the risk that another user unintentionally moves therobot arm within this period are also acceptable, as the probabilitythat the robot arm is completely left alone in free-drive mode ofoperation within a period of 5-30 seconds are very low.

According to an embodiment of the invention, the robot controller isconfigured to leave the free-drive mode of operation when no externalforce has been indicated by the at least one joint sensor within thepredetermined free-drive period of time or within the predeterminedrestart free-drive period of time.

According to an embodiment of the invention, the robot controller isconfigured for leaving the free-drive mode of operation upon receiving afree-drive deactivation signal. The free-drive deactivation signal canfor instance be established by a user via a user interface. This isadvantageous in that it has the effect, that the user at any time duringoperation of the robot arm is able to return to a different mode ofoperation than the free-drive mode of operation. Typically, the modes ofoperation are referred to as normal operation mode, run mode, remotemode and teach mode also referred to as Free-drive mode of operation.The robot is in normal operation mode e.g. when it is standing stille.g. to be programmed or is in a waiting position. The robot is in runmode e.g. when the robot controller is executing program code i.e. whenthe robot is in operation. The robot is in teach mode which is alsoreferred to as free-drive mode when a user is able to change posture ofthe robot by applying a force to part of the robot. Typically, the robotcontroller enters free-drive mode from normal mode of operation andreturns to normal mode of operation from free-drive mode of operation.

Additionally, or alternativity the free-drive deactivation signal can beestablished based on at least one joint sensor parameter for instance bycomparing the value of the at least one joint sensor parameter to atleast one free-drive operation joint sensor parameter threshold value.The at least one free-drive operation joint sensor parameter thresholdvalue can be any value defining a limit of a corresponding joint sensorparameter while the robot controller is in free-drive mode of operation.This makes it possible to monitor some joint sensor parameters duringthe free-drive mode of operation and leave the free-drive mode ofoperation if these joint sensor parameters exceed certain thresholdvalues. For instance, this makes it possible to monitor the same jointsensor parameters as monitored in the free-drive activation sequence butwith different threshold values. In other words, a free-drive activationjoint sensor parameter threshold value and free-drive operation jointsensor parameter threshold value may relate to the same joint sensorparameter but have different values. Consequently, it is possible toprovide different safety settings when activating the free-drive mode ofoperation and when being in free-drive mode of operation.

According to an embodiment of the invention, the robot controller isconfigured for presenting on an interface device the remainder of atleast one of the list comprising: activation period of time, activationsequence period of time, free-drive period of time and restartfree-drive period of time. This is advantageous in that it has theeffect that the user is able to visually see how long time there is leftof the activation period of time, the activation sequence period oftime, the free-drive period of time and/or the restart free-drive periodof time. Such illustration could be provided to the user as any type of2D or 3D diagram such as curve, column, circle, etc. Also, such diagramillustrated on the user interface could indicate the time passed of agiven period of time. A further effect is that the user then is able tosee when to apply a force to the robot to stay in Free-drive mode.Further, the robot controller may via the interface device present tothe user root cause to events leading to involuntary leaving thefree-drive mode as well as guidance on how to (e.g. which joints to movehow) get the robot arm back in a starting position, posture or desiredlocation/orientation in space.

According to an embodiment of the invention the at least one jointsensor parameters is selected from the list comprising speed,acceleration, torque, motor torque, force and position. Speed can forinstance indicate speed of a part of the robot arm such as speed of thetool flange in relation to the robot base, angular speed of the robotjoints. Acceleration can for instance indicate the acceleration of apart of the robot arm such as acceleration of the tool flange inrelation to the robot base, angular acceleration of the robot joints.Position can for instance indicate the position of a part of the robotarm such as position of the tool flange in relation to the robot base,the angular position of the robot joints. Torque and/or force canindicate the torque and/or force applied to a part of the robot armand/or the torque/force applied by a part of the robot arm for instanceto an external object. Motor torque can for instance indicate the torqueprovided by the joint motors and can for instance be indicate as jointmotor current.

According to an embodiment of the invention, a free-drive activationjoint sensor parameter threshold relating to a first monitored jointsensor parameter is different from the free-drive activation jointsensor parameter threshold value relating to a second monitored jointsensor parameter. This is advantageous in that it has the effect thate.g. a threshold value related to moving the robot arm (e.g. meters persecond) may have a value for acceleration and another for speed. Hence,the robot is allowed to increase speed for a given period of timedefined by a first threshold value, whereas the robot arm is allowed tomove with a constant speed for a period of time defined by a secondthreshold value different from the first threshold value. A more strictthreshold value for acceleration compared to speed is advantageous inthat it has the effect, that fast acceleration may lead to a collisionbetween robot arm and user i.e. a user safety issue, whereas a slowmovement of the payload e.g. towards the floor constituted a mechanicalsafety issue and which can be stopped by the user assisting the robotarm in lifting the payload.

According to an embodiment of the invention, the free-drive activationjoint sensor parameter threshold value is defined as a virtualthree-dimensional geometric shape surrounding a part of the robot arm.The virtual three-dimensional geometric shape can be any shape defininga boundary around a part of the robot arm, within which the part of therobot arm is allowed to move within a predefined period of time, such asthe activation period of time and/or the activation sequence period oftime. This is advantageous in that it has the effect, that thefree-drive activation joint sensor parameter threshold is moving withthe movement of a part of the robot arm and is initiated from thecurrent position of the part of the robot arm. For instance, the virtualthree-dimensional geometric shape can surround the tool flange anddefine a boundary wherein the tool flange is allowed to move during apredefined period of time. It is to be understood that the virtualthree-dimensional geometric shape can have any shape for instance asphere, an ellipsoid, a cube, a cuboid, a cylinder, a pyramid, apolyhedrons or any arbitrary three-dimensional shape. The part of therobot arm surrounded by the three-dimensional shape may in oneembodiment be arranged at the center of the three-dimensional geometricshape as this allows the part of the robot arm to move symmetricalwithin the three-dimensional geometric shape; however, it is noted thatthe part of the robot arm can be arranged at any position within thethree-dimensional shape. Note that the free-drive activation jointsensor parameter threshold value may be dynamic relative to other axisor positions moving with the movement of the robot arm.

According to an embodiment of the invention, the robot controller isconfigured for determining if the free-drive activation signal isestablished by a user by providing a robot feedback to the user upondetermining the appearance of the free-drive activation signal andwherein the robot controller is configured to enter the free-drive modeof operation upon determining the appearance of a user confirmationsignal in response to the robot feedback. The robot feedback can beprovided as any signal perceptible by a user such as an audio signal, avisual signal, a haptic feedback, a predetermined posture of one or morejoints, predetermined movements of one or more joints or combinationsthereof. The visual feedback can e.g. be a light flashing or words orfigures on the display of the graphic user interface. The audio signalcan e.g. be a tone or voice speaking words such as what the user shoulddo to activate the free-drive mode of operation. The user confirmationsignal can be established by a user interacting with a user interface.This is advantageous in that it has the effect, that the robotcontroller only will enter free-drive mode in case the user hasconfirmed her/his intentions to do so. Consequently, the user will beaware that the robot arm is about to enter free-drive mode of operation.It is noted that the user confirmation signal can be provided in form ofa physical signal, a logic signal, internally within the processor ofthe robot controller or combinations thereof.

According to an embodiment, the robot controller may be configured onlyto enter the free-drive mode of operation in case the user confirmationin response to the robot feedback is provided within at least one of theperiods of time of: 10 seconds, 5 seconds, 3 seconds, 2 seconds and 1second from the point in time where the robot feedback stops. This isadvantageous in that it has the effect that the robot controller wouldnot enter the free-drive mode of operation in lack of receiving the userconfirmation signal within the predefined period of time. Thereby it canbe avoided that the robot controller is continuously waiting for a userconfirmation signal that will not be generated. Hence, the robotcontroller does not confuse a random generated free-drive signal uponexpiry of this time period and thereby unexpectedly entering intofreed-drive mode is avoided.

According to an embodiment, the robot controller can be configured toprovide the robot feedback to the user and determining the appearance ofthe user confirmation in response to the robot feedback as a part of theactivation sequence, and if the user confirmation is received within thepredetermined activation sequence period of time the robot controllerwill enter the free-drive mode of operation.

According to an embodiment the user confirmation signal is establishedby a user activating at least one joint sensor of at least one of therobot joints. For instance, by the user performing at least one of thefollowing: providing a force/torque to the robot arm or a series offorces/torques to a part of the robot arm, moving at least one of therobot joints, twisting a part of the robot arm, arranging the robot armin posture or a series of postures. For instance, the robot controllercan be configured to establish the confirmation signal upon determiningthe appearance of a predetermined force provided by a user in responseto the robot feedback. The predetermined force (could also be referredto as a gesture) detected by the robot controller may be detected by achange in one or more motor joint parameter values. The robot controllercan determine that a predetermined force is from a user if the force isapplied in a predetermined direction, patter, sequence or the like.Thereby, if such predetermined force is following the robot feedback,the robot controller knows that the free-drive signal first received isnot established unintentionally and therefore safely can enterfree-drive mode. This is advantageous in that it has the effect, that nounexpected movement of the robot is initiated by the robot controllerduring the activation period of time of the free-drive mode even thoughthe payload weight is not correctly registered by the robot controller.This makes it possible for the user to establish the confirmation signaldirectly at the robot arm and the user can thus enter free-drive mode ofoperation without the need to use a robot teach pendent. This is usefulin situations where the user wants to use both hands for guiding therobot in free-drive mode of operation and in situations where the robotarm is remotely positioned from the robot teach pendent.

According to an embodiment the free-drive activation signal isestablished by a user activating at least one joint sensor of at leastone of the robot joints. For instance, by the user performing at leastone of the following: providing a force/torque to the robot arm or aseries of forces/torques to a part of the robot arm, moving at least oneof the robot joints, twisting a part of the robot arm, arranging therobot arm in posture or a series of postures. For instance, the robotcontroller can be configured to establish the free-drive activationsignal upon determining the appearance of a predetermined force providedby a user to the robot arm. The predetermined force (could also bereferred to as a gesture) detected by the robot controller may bedetected by a change in one or more motor joint parameter values. Therobot controller can determine that a predetermined force is from a userif the force is applied in a predetermined direction, patter, sequenceor the like. This makes it possible for the user to establish thefree-drive activation signal by interacting directly with the robot armand thus enter free-drive mode of operation without the need to use arobot teach pendent. This is useful in situations where the user wantsto use both hands for guiding the robot in free-drive mode of operationand in situations where the robot arm is remotely positioned from therobot teach pendent. It is noted that the user free-drive activationsignal can be provided in form of a physical signal, a logic signal,internally within the processor of the robot controller or combinationsthereof.

According to an embodiment of the invention, the free-drive activationsignal is established by activating a force sensor of the robot arm,wherein the value of force measured upon the activation of the forcesensor is above a predetermined force threshold value. Activating thefree-drive mode by applying a force to the robot arm is advantageous inthat it has the effect, that a user from any location relative to therobot arm can activate the free-drive mode. This includes also beingapart from the teach pendent. Accordingly, as long as the user is in aposition where she/he can apply a force to the robot arm, free-drivemode can be activated leading to increased flexibility in training ofthe robot arm. An additional advantage of being able to activatefree-drive mode apart from the teach pendent, is that the user then hastwo hands free to move the robot arm. Two arms are advantages when aprecision tool is to be positioned or joints is to be moved following aparticular path in space.

In one embodiment, the force sensor is part of or mounted to the robottool flange. Using the force sensor to establish the free-driveactivation signal is advantageous in that it has the effect, that noadditional hardware is needed beyond what is already used when the robotarm is in operation.

According to an embodiment of the invention, the predetermined forcethreshold value is a threshold value for a force in a predeterminedorientation in space. This is advantageous in that it has the effect,that only a force above a predetermined magnitude applied in apredetermined orientation in space e.g. in a predetermined directionwill have the potential to establish the free-drive activation signal.Hereby the risk of unintentionally activation of the free drive mode ofoperation is reduced.

According to an embodiment of the invention, the free-drive activationsignal is established by activating a force and torque sensor of therobot arm, wherein the value of measured force is above a predeterminedforce value, and wherein the value of measured torque is below apredetermined torque threshold value. This is advantageous in that ithas the effect, that force and torque are both measured leading to animproved sorting out of force signals not intended to activate thefree-drive mode. Almost all forces applied to a force and torque sensorof a robot arm is accompanied by a torque. This is however not true if aperson intentionally applies a force along one of the sensing axis ofthe force-torque sensor. In this situation, the force applied would beaccompanied by only a very limited torque if any. Hence, a force appliedby a person can be filtered from a force applied e.g. from a collision,random touch of the robot arm or tool, vibrations of the robot arm etc.by also evaluating the torque.

In one embodiment, the force sensor and torque sensor are provided as acombined force-torque sensor forming a part of or mounted to the robottool flange. Using the force-torque sensor to establish the free-driveactivation signal is advantageous in that it has the effect, that noadditional hardware is needed beyond what is already used when the robotarm is in operation.

According to one embodiment, the joint sensor parameter is selected fromthe list comprising: speed, acceleration, torque, motor torque, motorcurrent, force and position. This is advantageous in that it has theeffect, that movement of the robot arm can be monitored and stopped ifthe value of one or more of these joint sensor parameters are outside apredetermined range defined by at least one upper or lower thresholdvalue. It should be mentioned, that the joint sensor parameters may alsoinclude values derived from actual measured values i.e. values whichcannot be measure directly by a sensor but can be established bymeasured values.

Moreover, the invention relates to a robot arm comprising a plurality ofrobot joints connecting a robot base and a robot tool flange; where eachof the robot joints comprises:

-   -   an output flange rotatable in relation to a robot joint body,    -   a joint motor configured to rotate the output flange,    -   at least one joint sensor providing a sensor signal indicative        of at least one of an angular position of the output flange, an        angular position of a shaft of the joint motor, a motor current        of the joint motor.        The robot arm comprises at least one robot controller configured        to control the robot joints by controlling the motor torque        provided by the joint motors based on the sensor signal and the        robot controller is further configured as described in any one        of paragraphs [0010]-[0045] and or as illustrated in the figures        and the corresponding description of the figures.

Moreover, the invention relates to a method of activating free-drivemode of operation of a robot arm, wherein the free-drive mode ofoperation comprises the steps of:

-   -   maintaining the robot arm in a static posture when only gravity        is acting on the robot arm;    -   changing posture of the robot arm when an external force        different from gravity is applied to the robot arm;        where the method comprises the steps of:    -   by a user establishing a free-drive activation signal;    -   by a robot controller receiving the free-drive activation        signal;    -   by the robot controller starting a free-drive activation        sequence upon receiving the free-drive activation signal;        wherein the free-drive activation sequence comprises the steps        of:    -   in a predetermined activation sequence period of time monitor a        value of at least one joint sensor parameter,    -   compare the value of the at least one joint sensor parameter to        a least one free-drive activation joint sensor parameter        threshold value, and    -   by the robot controller change mode of operation of the robot        arm to free-drive mode of operation if the value of the at least        one joint sensor parameter does not exceed the free-drive        activation joint sensor parameter threshold value within the        predetermined activation sequence period of time.

This provides the same effects and advantages as described previously(e.g. in paragraphs [0012]-[0013]) and makes it possible for the user ofa robot arm independent of her/his location relative to the robot arm orinterface device is able to activate the free-derive mode of operationin a safe way as the robot arm only are switched into free-drive mode ofoperation if during the activation sequence period are completed.

According to an embodiment the step of starting the free-driveactivation sequence is initiated upon receiving the free-driveactivation signal for a predetermined activation period of time. Thisprovides the same effects and advantages as described previously (e.g.in paragraphs [0018]-[0021]) and makes it possible to ensure that thereceived free-drive activation signal is intentionally established by auser.

According to embodiments:

-   -   the free-drive mode of operation is maintained for a        predetermined free-drive period of time;    -   the method comprises a step of by the robot controller starting        a predetermined restart free-drive period of time, when the        robot arm is in a static posture; and/or    -   the method comprises a step of by the robot controller leaving        the free-drive mode of operation if the robot arm has been kept        in a static posture within the predetermined free-drive period        of time or within the predetermined restart free-drive period of        time.        This provides the same effects and advantages as described        previously (e.g. in paragraph [0022]-[0028]) and makes it        possible for a user to change grip when changing posture of the        robot arm using both hands.

According to embodiments:

-   -   the method comprises the steps of:        -   establishing a free-drive deactivation signal;        -   by the robot controller receiving the free-drive activation            signal;        -   by the robot controller leaving the free-drive mode of            operation upon receiving the free-drive deactivation signal;            and/or    -   the step of establishing the free-drive deactivation signal        comprises the steps of:        -   by the robot controller monitor a value of at least one            joint sensor parameter,        -   by the robot controller compare the value of the at least            one joint sensor parameter to a least one free-drive            operation joint sensor parameter threshold value, and        -   by the robot controller establish the free-drive            deactivation signal if the value of the at least one joint            sensor parameter does exceed the free-drive operation joint            sensor parameter threshold value.            This provides the same effects and advantages as described            previously (e.g. in paragraphs [0029]-[0030]) and makes it            possible to ensure that a user manually can leave the            free-drive mode of operation and/or the robot controller            automatically can leave the free-drive mode of operation.

According to an embodiment the step of establishing the free-driveactivation signal comprises a step of by a user applying a force at apart of the robot arm. Also, in an embodiment the step of applying aforce at a part of the robot arm comprises applying the force in apredetermined orientation in space and at a predetermine position at therobot arm. Also, in an embodiment the step of applying a force at a partof the robot arm comprises applying the force to a force-torque sensorprovided at the robot arm; and wherein the free-drive activation signalis established if a force obtained by the force-torque sensor is above apredetermined force value and a torque obtained by the force-torquesensor is below a predetermined torque value. This provides the sameeffects and advantages as described previously (e.g. in paragraphs[0039]-[0045]) and makes it possible for a user to enter the free-drivemode of operation by interacting (e.g. touching. pulling, pushing,lifting etc.) with a part of the robot arm and unintentional free-driveactivation signals can be minimized. The predetermined period of time ofreceiving the free-drive activation signal is wither a continuous periodor the sum of two or more discrete time periods of the signal has beenreceived. The unintentional forces are sorted out and thereby are notestablishing the free-drive activation signal. This is because a usercan apply the force substantially in one direction without also applyinga torque. Therefore, if the torque measured is low, while the forcemeasured is higher the robot controller can be configured to interpretthis force as a force intentionally applied by a user to activatefree-drive mode of operation, as the low torque indicates that a userpresses directly towards the force sensor.

Second Aspect of the Invention

The above described limitations with the prior art or other problems ofthe prior art are also address by a robot controller, robot arm andmethod according to a second aspect of the present invention.

According to the second aspect, the invention relates to a robotcontroller for controlling a robot arm is switchable from a current modeof operation into a free-drive mode of operation where the robotcontroller in the free-drive mode of operation is configured to:

-   -   maintain the robot arm in a static posture when only gravity is        acting on the robot arm;    -   allow change in posture of the robot arm when an external force        different from gravity is applied to the robot arm;        wherein the free-drive mode of operation is activatable by a        user establishing a free-drive mode signal to the robot        controller and the robot controller is in the free-drive mode of        operation configured to:    -   monitor a value of at least one joint sensor parameter;    -   compare the value of the at least one joint sensor parameter to        at least one maintain free-drive joint sensor parameter        threshold value;    -   maintain the robot arm in the free-drive mode of operation for a        maintain free-drive period of time; and    -   leave the free-drive mode of operation if the value of the at        least one joint sensor parameter does not exceed the at least        one maintain free-drive joint sensor parameter threshold value        within the maintain free-drive period of time.        Maintaining the robot arm in free-drive mode of operation for        the maintain free-drive period of time ensures that the user        after activation of the free-drive mode of operation has some        time to initiate movement of the robot arm. The maintain        free-drive period of time is a period of time in which the robot        controller maintains the robot arm in the free-drive mode of        operation after the robot controller have switch to the        free-drive mode of operation. At the same time safety of the        free-drive mode of operation is maintained, as the robot        controller is configured to monitor at least one joint sensor        parameter and compare the joint sensor parameter with a maintain        free-drive sensor parameter threshold value and to leave the        free-drive mode of operation if the monitored joint sensor        parameter does not exceed the maintain joint sensor parameter        threshold value with in the maintain free-drive period of time.        That a joint sensor parameter does not exceeds the joint sensor        parameter threshold value means that the value of the joint        sensor parameter is within or does not violate an allowed value        as defined by the threshold value. For instance, in case of a        maximum threshold value the joint sensor parameter does not        exceed the joint sensor parameter threshold value if the value        of the joint sensor parameter is smaller than the joint sensor        parameter threshold value. Also, in case of a minimum threshold        value the joint sensor parameter does not exceed the joint        sensor parameter threshold value if the value of the joint        sensor parameter is larger than the joint sensor parameter        threshold value. Also, in case of a range of threshold values        the joint sensor parameter does not exceed the joint sensor        parameter threshold value if the value of the joint sensor        parameter is larger than a lower joint sensor parameter        threshold value and smaller than an upper joint sensor parameter        threshold value. This makes it possible to monitor if the        posture of the robot arm is change by a user applying an        external force to the robot arm and maintain the robot arm in        free-drive mode of operation as along as the user manipulates        the posture of the robot arm; however if the user stops changing        the posture of the robot arm and leaves the robot arm for the        maintain free-drive period of time the robot controller is        configured to leave the free-drive mode of operation. This        ensure that the robot arm can not be left alone in free-drive        mode of operation thereby avoiding hazards situations where        another user approaches the robot arm unaware of the fact that        the robot arm is in free-drive mode of operation, as an user        expects a stationary robot arm to be in a stop/brake mode of        operation where the robot arm cannot move. Hence in practice,        the period of time the robot arm is maintained in the free-drive        mode is reset when the user starts moving the joints of the        robot arm by applying force/torque. After a period of time        (restart free-drive period) starting when the user stops        applying a force/torque, the mode of operation will switch to        another mode of operation such a teach mode, run mode, stop        mode, etc. This is advantageous in that it has the effect, that        the user can maintain the robot arm in free-drive mode of        operation for as long time as needed by applying a force to the        robot arm before expiry of the restart period of time. This        allows the user to change his/her grip of the robot arm which in        some situation can be desired by the user changing posture of        the robot arm in free-drive mode of operation

According to an embodiment of the second aspect of the invention, therobot controller is configured to:

-   -   start a restart free-drive period of time if the value of the at        least one joint sensor parameter exceeds the at least one        maintain free-drive joint sensor parameter threshold value; and    -   maintain the robot arm in the free-drive mode of operation for        the restart free-drive period of time; and    -   leave the free-drive mode of operation if the value of the at        least one joint sensor parameter does not exceed the at least        one maintain free-drive joint sensor parameter threshold value        within said restart free-drive period of time.

The predetermined restart free-drive period of time is a period of timewhich is started if the value of at least one joint sensor parameterexceeds at least one maintain free-drive joint sensor parameterthreshold value. The restart free-drive period of time can be startedwhen the joint sensor parameter exceeds the maintain free-driveparameter, consequently the restart free-drive period of time will bestarted when a user starts to manipulate the robot arm. In anotherembodiment the restart free-drive period of time can start when thevalue of at least one joint sensor parameter does not exceed the atleast one maintain free-drive joint sensor parameter threshold valueafter the value of the at least one joint sensor parameter has exceededthe at least one maintain free-drive joint sensor parameter thresholdvalue. Consequently, the restart free-drive period of time can bestarted when a user has stopped manipulating the robot arm for instancewhen the robot arm has been arranged in the static posture, for instancewhen a user has stopped moving the robot arm and thus does not apply aforce or a torque to the robot arm. This ensures that the user afterhaving move the robot arm in the free-drive mode of operation has sometime to re-start movement of the robot arm, for instance in order toallow the user to change grip of the robot arm.

According to an embodiment of the second aspect of the invention, therobot controller is configured to leave the free-drive mode of operationwhen no external force has been indicated by the at least one jointsensor within the predetermined free-drive period of time or within thepredetermined restart free-drive period of time.

According to an embodiment of the second aspect of the invention, themaintain free-drive period of time and/or the restart free-drive periodof time is at least 2 seconds allowing a user to change her/his grip ofthe robot arm and initiate/re-initiate movement of the robot arm beforethe maintain free-drive period of time and/or the restart free-driveperiod expires. However, it is to be understood that the maintainfree-drive period of time and/or the restart free-drive period of timealternatively can be at least any one of the following periods of timeof 10 second, 5 seconds, 3 seconds. Periods of 5-10 seconds will allowthe user to perform additional tasks such as registering of waypoints,moving external objects, adjusting tools mounted to the robot arm beforethe robot arm exits the free-drive mode of operation.

According to an embodiment of the second aspect of the invention, themaintain free-drive period of time and/or the restart free-drive periodof time is at most 5 seconds preventing that a user unintentionally canmove the robot arm after having left the robot arm alone for a period of5 seconds. This reduces the risk of hazardous situations as describeabove. However, it is to be understood that the maintain free-driveperiod of time and/or the restart free-drive period of timealternatively can be at most any one of the following periods of time of10 seconds, 15 seconds, 20 seconds, 30 seconds. Periods of 5-30 secondswill allow the user to perform additional tasks such as registering ofwaypoints, moving external objects, adjusting tools mounted to the robotarm before the robot arm exits the free-drive mode of operation, whilethe risk of unintentional movements of the robot arm are still kept atan acceptable level, as a user seldom forgets that the robot arm is infree-drive mode of operation within periods of these times. Further, therisk that another user unintentionally moves the robot arm within thisperiod are also acceptable, as the probability that the robot arm iscompletely left alone in free-drive mode of operation within a period of5-30 seconds are very.

The maintain free-drive period of time and/or the restart free-driveperiod of time can be predetermined and provided as values stored in amemory of the robot controller, however in other embodiments a user canbe allowed to modify the length of the free-drive period of time and/orthe restart free-drive period of time for instance via a user interface.This allows a user to adjust the length of the maintain free-driveperiod of time and/or the restart free-drive period of time according topersonal needs. In one embodiment a maximum time for the maintainfree-drive period of time and/or the restart free-drive period of timecan be predefined and the robot controller can be configured only toallow the user to adjust the length of the maintain free-drive period oftime and/or the restart free-drive period of time to have the maximumdefined length.

Hence in practice, the period of time the robot arm is maintained in thefree-drive mode is reset when the user starts moving the joints of therobot arm by applying force/torque. After a period of time (restartfree-drive period) starting when the user stops applying a force/torque,the mode of operation will switch to another mode of operation such ateach mode, run mode, stop mode, etc. This is advantageous in that ithas the effect, that the user can maintain the robot arm in free-drivemode of operation for as long time as needed by applying a force to therobot arm before expiry of the restart period of time. This allows theuser to change his/her grip of the robot arm which in some situation canbe desired by the user changing posture of the robot arm in free-drivemode of operation Further, the user can make the robot controller leavethe free-drive mode of operation simply by not applying a force/torquefor a period of time defined by the restart free-drive period of time.Further, at least in relation to safety (person and mechanic), this isadvantageous in that the robot is not maintained in the free-drive modeof operation where drifting of sensors over time otherwise could lead tochange of posture of the robot. Such drifting could ultimately result ina collision of payload or robot tool with floor or other objects withinrange of the robot arm. Furthermore maintaining the robot arm infree-drive mode of operation after a user have left the robot arm mayalso lead to hazards situations in case another user approaches therobot arm unaware of the fact that the robot arm is in free-drive modeof operation, as an user expects a stationary robot arm to be in astop/brake mode of operation where the robot arm cannot move.

According to an embodiment of the second aspect of the invention, therobot controller is configured to start at least one of the maintainfree-drive period of time and the restart free-drive period of time uponexpiry of the free-drive mode signal. This result in the fact that therobot arm can be kept in the free-drive mode of operation for themaintain free-drive period of time and/or the restart free-drive periodof time after a user have stop establishing the free-drive mode signal.This is for instance useful in situations where the free-drive modesignal is established by a user pushing a free-drive bottom and the userit thus allowed to release the button while the robot arm is kept infree-drive mode of operation for a period of time after the button havebeen released.

According to an embodiment of the second aspect of the invention, therobot controller is configured to restart the maintain free-drive periodof time or the restart free-drive period of time based on a restartfree-drive mode signal established by a user. The free-drive restartsignal can for instance be established by a user via a user interface.This is advantageous in that it has the effect, that the user at anytime during the free-drive mode of operation manually can restart themaintain free-drive period of time or the restart free-drive period oftime. This is for instance useful in situations where the user wants therobot arm to stay in free-drive mode of operation at a static posturefor a longer/additional period of time e.g. in order to allow the userto perform other tasks.

According to an embodiment of the second aspect of the invention, the atleast one joint sensor parameter is selected from the list comprising:acceleration of at least a part of the robot arm, speed of at least apart of the robot arm and position of at least a part of the robot armand where the maintain free-drive joint sensor parameter threshold valueis selected from the list comprising; a threshold acceleration of atleast a part of the robot arm, a threshold speed of at least a part ofthe robot arm and a threshold position of at least a part of the robotarm. Acceleration, speed and position joint sensor parameter relates tothe movements of the robot arm and can thus be used to register if apart of the robot arm have been moved and thus should be kept infree-drive mode of operation. For instance, the joint sensor parametercan indicate the acceleration of the robot arm and a corresponding jointsensor parameter threshold value can indicate a maximum acceleration andthe robot controller can be configured to leave the free-drive mode ofoperation if the acceleration of the robot arm has not exceeded themaximum acceleration for the maintain free-drive period of time and/orthe restart free-drive period of time. Also, the joint sensor parametercan indicate the speed of the robot arm and a corresponding joint sensorparameter threshold value can indicate a maximum speed and the robotcontroller can be configured to leave the free-drive mode of operationif the speed of the robot arm has not exceeded the maximum speed for themaintain free-drive period of time and/or the restart free-drive periodof time. Also, the joint sensor parameter can indicate the position ofthe robot arm and a corresponding joint sensor parameter threshold valuecan indicate a position range and the robot controller can be configuredto leave the free-drive mode of operation if the position of the robotarm has been inside the position range for the maintain free-driveperiod of time and/or the restart free-drive period of time.

According to an embodiment of the second aspect of the invention, the atleast one joint sensor parameter is selected from the list comprising:force applied to at least a part of the robot arm and torque applied toat least part of the robot arm and where the maintain free-drive jointsensor parameter threshold value is selected from the list comprising; athreshold force applied to at least a part of the robot arm and athreshold torque applied to at least part of the robot arm. Force and/ortorque applied to the robot arm can be used to register if a user infree-drive mode of operation tries to change the posture of the robotarm. Consequently if the force and/or torque applied to the robot armexceeds a corresponding threshold force and/or a corresponding thresholdtorque for the maintain free-drive period of time and/or the restartfree-drive period of time the robot controller can be configured tomaintain the robot arm in free-drive mode of operation as this indicatesthat a user is changing the posture of the robot arm. The thresholdforce and/or the threshold torque can for instance be obtained based ongravity's influence of the robot arm.

According to an embodiment of the second aspect of the invention, therobot controller is configured for leaving the free-drive mode ofoperation upon receiving a free-drive deactivation signal. Thefree-drive deactivation signal can for instance be established by a uservia a user interface. This is advantageous in that it has the effectthat the user at any time during operation of the robot arm is able toreturn to a different mode of operation than the free-drive mode ofoperation.

According to an embodiment of the second aspect of the invention, therobot controller is configured to provide robot feedback to the userbased on at least one of the remainders of the maintain free-driveperiod of time and the remainder of the restart free-drive period oftime. This is advantageous in that it has the effect that the robotcontroller can inform the user how long time there is left of themaintain free-drive period of time and/or the restart free-drive periodof time. Consequently, the user would be able to reset the maintainfree-drive period of time and/or the restart free-drive period of timeand thereby ensure the that robot arm is maintained in free-drive modeof operation. The robot feedback can be provided as any signalperceptible by a user such as an audio signal, a visual signal, a hapticfeedback, a predetermined posture of one or more joints, predeterminedmovements of one or more joints or combinations thereof. The audiosignal can e.g. be a tone, or a set of tones indicating a count down tothe expiry of the maintain free-drive period of timer and/or the restartfree-drive period of time, or voice speaking words such as what the usershould do to reset the maintain free-drive period of timer and/or therestart free-drive period of time. The visual feedback can e.g. be alight flashing or illustrations on the display of the graphic userinterface indicating the remainder of the maintain free-drive periodand/or the restart free-drive period. Such illustration could beprovided to the user as any type of 2D or 3D diagram such as curve,column, circle, etc. Also, such diagram illustrated on the userinterface could indicate the time passed of a given period of time. Afurther effect is that the user then is able to see when to apply aforce to the robot to stay in Free-drive mode. Further, the robotcontroller may via the interface device present to the user root causeto events leading to involuntary leaving the free-drive mode as well asguidance on how to (e.g. which joints to move how) get the robot armback in a starting position, posture or desired location/orientation inspace.

Moreover, according to the second aspect, the invention relates to arobot arm comprising a plurality of robot joints connecting a robot baseand a robot tool flange; each of the robot joints comprises:

-   -   an output flange rotatable in relation to a robot joint body,    -   a joint motor configured to rotate the output flange,    -   at least one joint sensor providing a sensor signal indicative        of at least one of an angular position of the output flange, an        angular position of a shaft of the joint motor, a motor current        of the joint motor.        The robot arm comprises at least one robot controller configured        to control the robot joints by controlling the motor torque        provided by the joint motors based on the sensor signal and the        robot controller is further configured as described in any one        of paragraphs [0053][0055]-[0067] and or as illustrated in the        figures and the corresponding description of the figures.

Moreover, according to the second aspect, the invention relates to amethod of operating a robot arm in free-drive mode of operation, whereinthe robot arm by a robot controller has been switched into thefree-drive mode of operation upon the robot controller receiving afree-drive activating signal established by a user, wherein thefree-drive mode of operation comprises the steps of:

-   -   maintaining the robot arm in a static posture when only gravity        is acting on the robot arm;    -   changing posture of the robot arm when an external force        different from gravity is applied to the robot arm;    -   by the robot controller monitor a value of at least one joint        sensor parameter;    -   by the robot controller compare the value of the at least one        joint sensor parameter to at least one maintain free-drive joint        sensor parameter threshold value;    -   by the robot controller maintain the robot arm in the free-drive        mode of operation for a predetermined maintain free-drive period        of time; and    -   by the robot controller leave the free-drive mode of operation        if the value of the at least one joint sensor parameter does not        exceed the at least one maintain free-drive joint sensor        parameter threshold value within the maintain free-drive period        of time.        This provides the same effects and advantages as described        previously (e.g. in paragraph [0053]) and makes it possible for        a user to manipulate the robot arm in free-drive mode of        operation with both hands and without the need of continuously        establishing a free-drive signal e.g. by pushing a button.

In an embodiment of the method according to the second aspect of theinvention, the method comprises the steps of:

-   -   by the robot controller starting a predetermined restart        free-drive period of time, when the value of the at least one        joint sensor parameter exceeds the at least one maintain        free-drive joint sensor parameter threshold value;    -   by the robot controller maintain the robot arm in the free-drive        mode of operation for the restart free-drive period of time; and    -   by the robot controller leave the free-drive mode of operation        if the value of the at least one joint sensor parameter does not        exceed the at least one maintain free-drive joint sensor        parameter threshold value within the restart free-drive period        of time.        This provides the same effects and advantages as described        previously (e.g. in paragraphs [0055]-[0061]) and ensures that a        user after having move the robot arm in the free-drive mode of        operation has some time to re-start movement of the robot arm,        for instance in order to allow the user to change grip of the        robot arm.

In an embodiment of the method according to the second aspect of theinvention, the method comprises the step of:

-   -   by the robot controller starting at least one of the maintain        free-drive period of time and the restart free-drive period of        time upon expiry of the free-drive mode signal.        This provides the same effects and advantages as described        previously (e.g. in paragraph [0062]) and ensures that the robot        arm can be kept in the free-drive mode of operation for the        maintain free-drive period of time and/or the restart free-drive        period of time after a user have stop establishing the        free-drive mode signal.

In an embodiment of the method according to the second aspect of theinvention, the method comprises the steps of:

-   -   by a user establishing a restart free-drive mode signal;    -   by the robot controller restarting at least one of the maintain        free-drive period of time or the restart free-drive period of        time based on the restart free-drive mode signal.        This provides the same effects and advantages as described        previously (e.g. in paragraph [0063][0056]) and ensures that a        user at any time during the free-drive mode of operation        manually can restart the maintain free-drive period of time or        the restart free-drive period of time.

In an embodiment of the method according to the second aspect of theinvention, the method comprises the step of:

-   -   by the robot controller leaving the free-drive mode of operation        upon receiving a free-drive deactivation signal.        This provides the same effects and advantages as described        previously (e.g. in paragraph [0066]) and ensures that that the        user at any time during operation of the robot arm is able to        return to a different mode of operation than the free-drive mode        of operation.

In an embodiment of the method according to the second aspect of theinvention, the method comprises the step of:

-   -   by the robot controller providing robot feedback to the user,        where the robot feedback is provided based on at least one of        the remainder of the predetermined maintain free-drive period of        time and the remainder of the restart maintain free-drive period        of time.        This provides the same effects and advantages as described        previously (e.g. in paragraph [0067]) and ensures that the user        can be informed that the maintain free-drive period of time        and/or the restart free-drive period of time is/are about to        expire and/or inform the user how long time there is left of the        maintain free-drive period of time and/or the restart free-drive        period of time.

Third Aspect of the Present Invention

The above described limitations with the prior art or other problems ofthe prior art are also address by a robot controller, robot arm andmethod according to a third aspect of the present invention.

According to the third aspect, the invention relates to a robotcontroller for controlling a robot arm, the robot controller isswitchable from a current mode of operation into a free-drive mode ofoperation, where the robot controller in the free-drive mode ofoperation is configured to:

-   -   maintain the robot arm in a static posture when only gravity is        acting on the robot arm;    -   allow change in posture of the robot arm when an external force        different from gravity is applied to the robot arm;        wherein the free-drive mode of operation is activatable by a        user establishing a free-drive mode signal to the robot        controller; where        the robot controller is configured to switch to the free-drive        mode of operation upon receiving the free-drive mode signal and        the robot controller is in the free-drive mode of operation        configured to:    -   monitor a value of at least one joint sensor parameter, and    -   compare the value of the at least one joint sensor parameter to        at least one free-drive operation joint sensor parameter        threshold value;        wherein the robot controller is configured for maintaining the        robot arm in the free-drive mode of operation if the value of        the at least one joint sensor parameter does not exceed the at        least one free-drive operation joint sensor parameter threshold        value, wherein the free-drive operation joint sensor parameter        threshold value is defined as a virtual three-dimensional        geometric shape surrounding a part of the robot arm and the        robot controller is configured for maintaining the robot arm in        the free-drive mode of operation if the value of the at least        one joint sensor parameter does not exceed the virtual        three-dimensional geometric shape surrounding a part of the        robot arm within at a free-drive safety period.

The virtual three-dimensional geometric shape can be any shape defininga boundary around a part of the robot arm, within which the part of therobot arm is allowed to move within the free-drive safety period oftime. This is advantageous in that it has the effect that apart of therobot arm in the free-drive mode of operation within the free-drivesafety period only can move within the virtual three-dimensionalgeometric shape. Situations where the part of the robot arm moves in anunsafe manner can hereby be avoided as the part of the robot arm onlycan move within a limited space. Consequently, hazardous movements causeby wrongly entered payload to the robot controller can be avoided as therobot controller can be configured to leave the free-drive mode ofoperation if the part of the robot exceeds the virtual dimensionalgeometric shape within the free-drive safety period. However, a userwill in a controlled manner be able to manually move the part of therobot arm within the virtual three-dimensional space. The free-drivesafety period of time can be any time period within which the part ofthe robot arm is allowed to move within the virtual three-dimensionalspace without creating hazards situations. The free-drive safety periodcan be predefined and/or dynamically configured for instance based onthe posture of the robot arm, the size of the three-dimensionalgeometric shape and/or a maximum average speed. The maximum averagespeed can for instance indicate the maximum average speed that the partof the robot arm is allowed to have from the start of the free-drivemode and to the point in time where the part of the robot arm reachesthe boundary of the virtual three-dimensional space. The maximum averagespeed can for instance be defined as a speed at which the part of therobot can move without causing damage to persons near the robot arm, asknown in the art of robot safety allowed moving speeds of robot armsdepends on the mass of the moving parts, the shape, the size of impactpoints, the body part of the human that may be hit by the robot arm. Anone limiting illustrating example, if at the beginning of thefree-drive mode the distance from the part of the robot arm to theboundary of the virtual three-dimensional space is 10 cm and the part ofthe robot arm is allowed to move at a speed of 50 cm/sec. then thefree-drive safety period would be 0.2 sec. The virtual three-dimensionalgeometric shape can surround the tool flange and define a boundarywherein the tool flange is allowed to move during a the free-drivesafety period of time. It is to be understood that the virtualthree-dimensional geometric shape can have any shape for instance asphere, an ellipsoid, a cube, a cuboid, a cylinder, a pyramid, apolyhedron or any arbitrary three-dimensional shape. The virtualthree-dimensional geometric shape can be predefined and/or dynamicallyconfigured for instance based on the posture of the robot arm. The partof the robot arm surrounded by the virtual three-dimensional shape mayin one embodiment be arranged at the center of the virtualthree-dimensional geometric shape as this allows the part of the robotarm to move symmetrical within the virtual three-dimensional geometricshape; however, it is noted that the part of the robot arm can bearranged at any position within the virtual three-dimensional shape. Theuser can thereby manipulate the robot arm in free-drive mode ofoperation with both hands in a safe manner and without the need ofcontinuously establishing a free-drive signal e.g. by pushing a button.

According to an embodiment of the third aspect of the invention, theposition of the virtual three-dimensional geometric shape is fixed inrelation to a reference point upon the robot controller switching tosaid free-drive mode of operation. The virtual three-dimensionalgeometrical shape can hereby be fixed in relation to a reference pointwhen the robot controller is switched into free-drive mode of operationand the part of the robot arm is then allowed to move within athree-dimensional space defined in relation to the reference point,where the three-dimensional space is defined by the virtualthree-dimensional space. The reference point may be any point inrelation to the robot arm and can for instance be defined in relation toa moving part of the robot arm, such as a tool flange, a wrist joint, anelbow joint, a shoulder joint, a robot link; a fixed part of the robotarm such as the base joint, which is fixed in relation to thesurroundings of the robot arm or a fixed point in the surroundings ofthe robot arm, such as a table, a work station, pick up point, conveyer,etc.

According to an embodiment of the third aspect of the invention therobot controller is configured to define the position of the virtualthree-dimensional geometric shape in relation to a reference point basedon the position of a part of said robot arm in relation to a fixedpoint. This makes it possible to define the position of the virtualthree-dimensional geometric shape in relation to a fixed point, based onthe position of the part of the robot arm surrounded by the virtualthree-dimensional geometric shape. For instance, the virtualthree-dimensional space may surround the tool flange of the robot armand the position of the three-dimensional geometric shape may be definedbased on the tool flange's position in relation to the robot base, wherethe robot base constitutes the fixed point.

According to an embodiment of the third aspect of the invention, theposition of the virtual three-dimensional geometric shape in relation toa reference point of the robot arm is redefined during said free-drivemode of operation. The position of the virtual three-dimensionalgeometrical shape in relation to a reference point can hereby beredefined during the free-drive mode of operation. Hereby it is possibleto redefine the position of the three-dimensional space in relation tothe reference point during free-drive mode of operation, which makes itpossible to move the part of the robot arm stepwise or gradually aroundin the surroundings of the robot arm. The reference point may be anypoint in relation to the robot arm and can for instance at any timeduring the free-drive mode of operation be defined as the position of apart of the robot arm in relation to a fixed point. For instance, thevirtual three-dimensional space may surround the tool flange of therobot arm and can at any time during the free-drive mode of operation befixed in relation to the tool flange's position in relation to the robotbase. The time at which the position of the virtual three-dimensionalgeometrical shape in relation to a reference point can for instance bedefined by a redefine position period of time. The redefine positionperiod of time can for instance define a time period starting when therobot controller is switch into free-drive mode of operation or startingwhen the position of the virtual three-dimensional geometrical shape inrelation to a reference point have been redefined. The redefine positionperiod of time can for instance have the same length as the free-drivesafety period of time and the robot controller can thus be configured toredefine the position of the virtual three-dimensional geometric shapein relation to a reference point of the robot arm upon expiry of thefree-drive safety period and if the value of the at least one jointsensor parameter has not exceeded the virtual three-dimensionalgeometric shape surrounding a part of the robot arm within thefree-drive safety period. This makes it possible to step wise orgradually move the part of the robot arm into positions beyond theinitial boundary defined by the virtual three-dimensional geometricalshape, as the position of the virtual three-dimensional space can beredefined if the part of the robot arm has not exceeded the boundary ofthe virtual three-dimensional space within the free-drive safety periodof time. In other words, the position of the three-dimensional spacewithin which the part of the robot arm is allowed to move can bestepwise or gradually moved in relation to a reference point.

According to an embodiment of the third aspect of the invention, therobot controller is configured to define the position of the virtualthree-dimensional geometric shape in relation to a reference point basedon a plurality of positions of the part of the robot arm in relation toa fixed point, where the plurality of positions of the part of the robotarm have been obtained at different points in time. This makes itpossible to ensure that the position of the visual three-dimensionalgeometric shape stepwise or gradually can move during the free-drivemode of operation. Consequently, a user can stepwise or gradually movethe part of the robot arm to positions which upon switching intofree-drive mode of operation were outside the boundaries defined by thevirtual three-dimensional space. For instance, the position of thevirtual three-dimensional geometric can be defined as the averageposition of a part of the robot arm with in an average position periodof time, where the average position of the part of the robot arm hasbeen obtained based on a plurality of positions of the part of the robotarm obtained within the average position period of time.

According to an embodiment of the third aspect of the invention, therobot controller is configured to provide robot feedback to the userupon determining if the value of the at least one joint sensor parameteris within a feedback value relating to the virtual three-dimensionalgeometric shape. This makes it possible to provide robot feedback to theuser when the user have move the part of the robot arm to a positionnear the boundary defined by the virtual three-dimensional space suchthat the value of the joint sensor parameter is about to exceed saidvirtual three-dimensional geometric shape. The robot feedback can beprovided as any signal perceptible by a user such as an audio signal, avisual signal, a haptic feedback, a predetermined posture of one or morejoints, predetermined movements of one or more joints or combinationsthereof. Consequently, the user will be warned that the robot arm hasbeen moved close to the boundaries and is close to a position where therobot controller will leave the free-drive mode of operation, and theuser can then counter act that this happens by stop moving the robot armin the direction towards the boundary. This can be achieved by comparingthe value of the at least one joint sensor parameter to the feedbackvalue relating to the virtual three-dimensional geometric shape, wherethe feedback value can be provided as a threshold value having a lowervalue than the free-drive operation joint sensor parameter thresholdvalue.

According to an embodiment of the third aspect of the invention, therobot feedback is provided as a robot force provided by a part of therobot arm, where the robot force is provided in a direction away fromthe virtual three-dimensional geometric shape. The user can hereby sensethat the part of the robot arm is approaching the boundary defined bythe virtual three-dimensional shape as an increase in moving resistanceof the robot arm. This can be achieved by configuring the robot are tocontrol the motor torque provided to the joint motors. The robotcontroller can also be contributed to increase the size of the robotforce as the value of the joint sensor parameter approaches thevirtual-dimensional geometric shape. Consequently, the user will sense alarger resistance the closer the robot arm is the boundary defined bythe virtual three-dimensional shape.

Moreover, according to the third aspect, the invention relates to arobot arm comprising a plurality of robot joints connecting a robot baseand a robot tool flange; each of the robot joints comprises:

-   -   an output flange rotatable in relation to a robot joint body,    -   a joint motor configured to rotate the output flange,    -   at least one joint sensor providing a sensor signal indicative        of at least one of an angular position of the output flange, an        angular position of a shaft of the joint motor, a motor current        of the joint motor.        The robot arm comprises at least one robot controller configured        to control the robot joints by controlling the motor torque        provided by the joint motors based on the sensor signal and the        robot controller is further configured as described in any one        of paragraphs [0075]-[0083] and or as illustrated in the figures        and the corresponding description of the figures.

Moreover according to the third aspect, the invention relates to amethod of operating a robot arm in free-drive mode of operation, wherethe robot arm by a robot controller has been switched into thefree-drive mode of operation upon the robot controller receiving afree-drive activating signal established by a user, wherein thefree-drive mode of operation comprises the steps of:

-   -   maintaining the robot arm in a static posture when only gravity        is acting on the robot arm;    -   changing posture of the robot arm when an external force        different from gravity is applied to the robot arm;    -   by the robot controller monitor a value of at least one joint        sensor parameter;    -   by the robot controller compare the value of the at least one        joint sensor parameter to at least one free-drive operation        joint sensor parameter threshold value; wherein the free-drive        operation joint sensor parameter threshold value is defined as a        virtual three-dimensional geometric shape surrounding a part of        the robot arm;    -   by the robot controller maintaining the robot arm in the        free-drive mode of operation if the value of the at least one        joint sensor parameter does not exceed the virtual        three-dimensional geometric shape surrounding a part of the        robot arm within a free-drive safety period.        This provides the same effects and advantages as described        previously (e.g. in paragraphs [0076]-[0077]) and makes it        possible to avoid situations where a part of the robot arm moves        in an unsafe manner. Consequently, hazardous movements cause by        wrongly entered payload to the robot controller can be avoided        as the robot controller can be configured to leave the        free-drive mode of operation if the part of the robot exceeds        the virtual dimensional geometric shape within the free-drive        safety period. A user can thereby manipulate the robot arm in        free-drive mode of operation with both hands in a safe manner        and without the need of continuously establishing a free-drive        signal e.g. by pushing a button.

According to an embodiment of the third aspect of the invention, themethod comprises a step of fixing the position of the virtualthree-dimensional geometric shape in relation to a reference point uponreceiving the free-drive mode signal. Also, the method may comprises astep of: during the free-drive mode of operation redefining the positionof the virtual three-dimensional geometric shape in relation to areference point. This provides the same effects and advantages asdescribed previously (e.g. in paragraph [0078]-[0081]) and makes itpossible for the user to step wise or gradually move the robot arm intopositions beyond the initial boundary defined by the virtualthree-dimensional geometrical shape.

According to an embodiment of the third aspect of the invention, themethod comprises a step of by the robot controller providing robotfeedback to the user upon determining if the value of the at least onejoint sensor parameter is within a feedback value relating to thevirtual three-dimensional geometric shape. The step of providing robotfeedback to the user may comprise a step of providing a robot force byat least a part of the robot arm, where the robot force is provided in adirection away from the virtual-dimensional geometric shape. Also, thestep of providing the robot force may comprise a step of increasing therobot force as the value of the joint sensor parameter approaches thevirtual-dimensional geometric shape. This provides the same effects andadvantages as described previously (e.g. in paragraph [0082]-[0083]) andmakes it possible to provide feedback to the user that the robot arm isabout to leave the free-drive mode of operation.

It is noted that the embodiments of the various aspects of the presentinvention as described previously may be combined in any order orcombination. Hereby further advantages and effects can be provided. Forinstance, a combination of the embodiments of the first aspect of theinvention and the second aspect of the invention results in the effectat a user can activate free drive mode of operation directly at therobot arm in order to manipulate the robot arm in free-drive mode ofoperation using both hands. The combinations of the embodiments of thefirst aspect of the invention and the third aspect of the inventionresults in the effect at a user can activate free drive mode ofoperation directly at the robot arm in order to manipulate the robot armand in the free-drive mode of operation safely move the robot aroundwithout risk of hazardous movements for instance due to changing payloadduring the free-drive mode of operation. The combinations of theembodiments of the second aspect of the invention and the third aspectof the invention results in the effect that the user can move the robotarm in free-drive mode of operation using both hands without risk ofhazardous movements for instance due to changing payload during thefree-drive mode of operation. The combinations of the embodiments of thefirst, second and third aspect of the invention results in the fact thata robot arm can be provided with a safe and user-friendly free-drivemode of operation where the user safely activate the free-drive mode ofoperation and thereafter move the robot arm using both hands in a safe areliable manner.

Further and additional advantages and benefits of the present inventionmay be described in the detailed description of the invention.

BRIEF DESCRIPTION OF THE DRAWINGS

For a more complete understanding of this disclosure, reference is nowmade to the following brief description, taken in connection with theaccompanying drawings and detailed description:

FIG. 1 illustrates a robot arm according to the present invention;

FIG. 2 illustrates a simplified structural diagram of the robot arm;

FIG. 3 illustrates a flow diagram of the method of changing the postureof a robot arm; and

FIG. 4 illustrates a flow diagram of a method of changing posture of arobot arm in the free-drive mode of operation.

DETAILED DESCRIPTION OF THE INVENTION

The present invention is described in view of exemplary embodiments onlyintended to illustrate the principles of the present invention.

The skilled person will be able to provide several embodiments withinthe scope of the claims. Throughout the description, the referencenumbers of similar elements providing similar effects have the same lasttwo digits. Further it is to be understood that in the case that anembodiment comprises a plurality of the same features then only some ofthe features may be labeled by a reference number.

FIG. 1 illustrates a robot arm 101 comprising a plurality of robotjoints 102 a, 102 b, 102 c, 102 d, 102 e, 102 f connecting a robot base103 and a robot tool flange 104. A base joint 102 a is configured torotate the robot arm around a base axis 105 a (illustrated by a dasheddotted line) as illustrated by rotation arrow 106 a; a shoulder joint102 b is configured to rotate the robot arm around a shoulder axis 105 b(illustrated as a cross indicating the axis) as illustrated by rotationarrow 106 b; an elbow joint 102 c is configured to rotate the robot armaround an elbow axis 105 c (illustrated as a cross indicating the axis)as illustrated by rotation arrow 106 c, a first wrist joint 102 d isconfigured to rotate the robot arm around a first wrist axis 105 d(illustrated as a cross indicating the axis) as illustrated by rotationarrow 106 d and a second wrist joint 102 e is configured to rotate therobot arm around a second wrist axis 105 e (illustrated by a dasheddotted line) as illustrated by rotation arrow 106 e. Robot joint 102 fis a tool joint comprising the robot tool flange 104, which is rotatablearound a tool axis 105 f (illustrated by a dashed dotted line) asillustrated by rotation arrow 106 f. The illustrated robot arm is thus asix-axis robot arm with six degrees of freedom with six rotational robotjoints, however it is noticed that the present invention can be providedin robot arms comprising less or more robot joints and also other typesof robot joints such as prismatic robot joints providing a translationof parts of the robot arm for instance a linear translation.

A robot tool flange reference point 107 also known as a TCP is indicatedat the robot tool flange and defines the origin of a tool flangecoordinate system defining three coordinate axis x_(flange), y_(flange),z_(flange). In the illustrated embodiment the origin of the robot toolflange coordinate system has been arrange on the tool flange axis 105 fwith one axis (z_(flange)) parallel with the tool flange axis and withanother axis x_(flang)e, y_(flange) parallel with the outer surface ofthe robot tool flange 104. Further a base reference point 108 iscoincident with the origin of a robot base coordinate system definingthree coordinate axis x_(base), y_(base), z_(base). In the illustratedembodiment the origin of the robot base coordinate system has beenarrange on the base axis 105 a with one axis (z_(base)) parallel withthe base axis 105 a axis and with another axis x_(base), y_(base)parallel with at the bottom surface of the robot base. The direction ofgravity 109 in relation to the robot arm is also indicated by an arrowand it is to be understood that the robot arm can be arrange at anyposition and orientation in relation to gravity only limited by thefreedom of operation of the robot joints.

The robot arm comprises at least one robot controller 110 configured tocontrol robot arm 101 and can be provided as a computer comprising ininterface device 111 enabling a user to control and program the robotarm. The controller can be provided as an external device as illustratedin FIG. 1 or as a device integrated into the robot arm or as acombination thereof. The interface device can for instance be providedas a teach pendent as known from the field of industrial robots whichcan communicate with the controller via wired or wireless communicationprotocols. The interface device can for instanced comprise a display 112and a number of input devices 113 such as buttons, sliders, touchpads,joysticks, track balls, gesture recognition devices, keyboards etc. Thedisplay may be provided as a touch screen acting both as display andinput device. The interface device can also be provided as an externaldevice configured to communicate with the robot controller, for instanceas smart phones, tablets, PCs, laptops, etc. The interface device can bea teach pendent or handle or smartphone communicating wired or wirelesswith the robot controller.

The robot tool flange 104 comprises a force-torque sensor 114 (sometimesreferred to simply as fore sensor) integrated into the robot tool flange104. The force-torque sensor 114 provides a tool flange force signalindicating a force-torque provided at the robot tool flange. In theillustrated embodiment the force-torque sensor is integrated into therobot tool flange and is configured to indicate the forces and torquesapplied to the robot tool flange in relation to the robot tool flangereference point 107. The force-torque sensor 114 provides a force andtorque signal indicating a force and torque provided at the tool flange.In the illustrated embodiment the force-torque sensor is integrated intothe robot tool flange and is configured to indicate the forces-torqueapplied to the robot tool flange in relation to the reference point 107and in the tool flange coordinate system. However, the force-torquesensor can indicate the force-torque applied to the robot tool flange inrelation to any point which can be linked to the robot tool flangecoordinate system. In one embodiment the force-torque sensor is providedas a six-axis force-torque sensor configured to indicate the forcesalong and the torques around three perpendicular axis. The force-torquesensor can for instance be provided as any force-torque sensor capableof indicating the forces and torques in relation to a reference pointfor instance any of the force torque sensors disclosed byWO2014/110682A1, U.S. Pat. No. 4,763,531, US2015204742. However, it isto be understood that the force sensor in relation to the presentinvention not necessarily need to be capable of sensing the torqueapplied to the tool flange. It is noted that the force-torque sensor maybe provided as an external device arranged at the robot tool flange oromitted.

An acceleration sensor 115 is arranged at the robot tool joint 102 f andis configured to sense the acceleration of the robot tool joint 102 fand/or the acceleration of the robot tool flange 104. The accelerationsensor 115 provides an acceleration signal indicating the accelerationof the robot tool joint 102 f and/or the acceleration of the robot toolflange 104. In the illustrated embodiment the acceleration sensor isintegrated into the robot tool joint and is configured to indicateaccelerations of the robot tool joint in the robot tool coordinatesystem. However, the acceleration sensor can indicate the accelerationof the robot tool joint in relation to any point which can be linked tothe robot tool flange coordinate system. The acceleration sensor can beprovided as any accelerometer capable of indicating the accelerations ofan object. The acceleration sensor can for instance be provided as anIMU (Inertial Measurement Unit) capable of indicating both linearacceleration and rotational accelerations of an object. It is noted thatthe acceleration sensor may be provided as an external device arrangedat the robot tool flange or omitted.

Each of the robot joints comprises a robot joint body and an outputflange rotatable or translatable in relation to the robot joint body andthe output flange is connected to a neighbor robot joint either directlyor via an arm section as known in the art. The robot joint comprises ajoint motor configured to rotate or translate the output flange inrelation to the robot joint body, for instance via a gearing or directlyconnected to the motor shaft. The robot joint body can for instance beformed as a joint housing and the joint motor can be arranged inside thejoint housing and the output flange can extend out of the joint housing.Additionally, the robot joint comprises at least one joint sensorproviding a sensor signal indicative of at least one of the followingparameters: an angular and/or linear position of the output flange, anangular and/or linear position of the motor shaft of the joint motor, amotor current of the joint motor or an external force and/or torquetrying to rotate the output flange or motor shaft. For instance, theangular position of the output flange can be indicated by an outputencoder such as optical encoders, magnetic encoders which can indicatethe angular position of the output flange in relation to the robotjoint. Similarly, the angular position of the joint motor shaft can beprovided by an input encoder such as optical encoders, magnetic encoderswhich can indicate the angular position of the motor shaft in relationto the robot joint. It is noted that both output encoders indicating theangular position of the output flange and input encoders indicating theangular position of the motor shaft can be provided, which inembodiments where a gearing have been provided makes it possible todetermine a relationship between the input and output side of thegearing. The joint sensor can also be provided as a current sensorindicating the current through the joint motor and thus be used toobtain the torque provided by the motor. For instance, in connectionwith a multiphase motor, a plurality of current sensors can be providedin order to obtain the current through each of the phases of themultiphase motor. It is also noted that some of the robot joints maycomprise a plurality of output flanges rotatable and/or translatable byjoint actuators, for instance one of the robot joints may comprise afirst output flange rotating/translating a first part of the robot armin relation to the robot joint and a second output flangerotating/translating a second part of the robot arm in relation to therobot joint. As indicated above, the joint sensor can also be providedas a force and/or torque sensor or acceleration sensor. Such forceand/or torque and acceleration sensor may be part of the outmost jointas indicated on FIG. 1 , however the other parts of the robot arm mayalso comprise force/torque sensors.

The robot controller is configured to control the motions of the robotarm by controlling the motor torque provided to the joint motors basedon a dynamic model of the robot arm, the direction of gravity acting 109and the sensor signal.

FIG. 2 illustrates a simplified structural diagram of the robot armillustrated in FIG. 1 . The robot joints 102 a, 102 b and 102 f havebeen illustrated in structural form and the robot joints 102 c, 102 d,102 e and the robot links connecting the robot joints have been omittedfor the sake of simplicity of the drawing. Further the robot joints areillustrated as separate elements however it is to be understood thatthey are interconnected either directly or via robot links asillustrated in FIG. 1 . The robot joints comprise an output flange 216a,216 b,216 f and a joint motor 217 a, 217 b, 217 f or another kind ofactuator, where the output flange 216 a,216 b,216 f is rotatable inrelation to the robot joint body. The joint motors 217 a, 217 b, 217 fare respectively configured to rotate the output flanges 216 a, 216 b,216 f via an output axle 218 a, 218 b, 218 f. It is to be understoodthat the joint motor or joint actuator may be configured to rotate theoutput flange via a transmission system such as a gear (not shown). Inthis embodiment the output flange 216 f of the tool joint 123 fconstitutes the tool flange 104. At least one joint sensor 219 a, 219 b,219 f providing a sensor signal 220 a, 220 b, 220 f indicative of atleast one joint sensor parameter J_(sensor,a), J_(sensor,b),J_(sensor,f) of the respective joint. The joint sensor parameter can forinstance indicate a pose parameter indicating the position andorientation of the output flange in relation to the robot joint body, anangular position of the output flange, an angular position of a shaft ofthe joint motor, a motor current of the joint motor. The joint sensorparameter is selected from the list comprising: speed, acceleration,torque, motor torque, force and position. The joint sensor parameterscan be measures obtained from sensors or values derived from such sensorvalues. For instance, the angular position of the output flange can beindicated by an output encoder such as optical encoders, magneticencoders which can indicate the angular position of the output flange inrelation to the robot joint. Similar, the angular position of the jointmotor shaft can be provided by an input encoder such as opticalencoders, magnetic encoders which can indicate the angular position ofthe motor shaft in relation to the robot joint. The motor currents canbe obtained and indicated by current sensors.

The robot controller 110 comprises a processer 221 and memory 222 and isconfigured to control the joint motors of the robot joints by providingmotor control signals 223 a, 223 b, 223 f to the joint motors. The motorcontrol signals 223 a, 223 b, 223 f are indicative of the motor torqueT_(motor,a), T_(motor,b), and T_(motor,f) that each joint motor shallprovide to the output flanges and the robot controller is configured todetermine the motor torque based on a dynamic model of the robot arm asknown in the prior art. The dynamic model makes it possible for thecontroller to calculate which torque the joint motors shall provide toeach of the joint motors to make the robot arm perform a desiredmovement. The dynamic model of the robot arm can be stored in the memory222 and be adjusted based on the joint sensor parameters J_(sensor,a),J_(sensor,b) J_(sensor,f) For instance, the joint motors can be providedas multiphase electromotors and the robot controller can be configuredto adjust the motor torque provided by the joint motors by regulatingthe current through the phases of the multiphase motors as known in theart of motor regulation.

Robot tool joint 102 f comprises the force-torque sensor 114 providing atool flange force-torque signal 224 indicating a force-torqueFTflan_(g)e provided to the tool flange. For instance, the forcesignal-torque FTflan_(g)e can be indicated as a force vector {rightarrow over (F_(sensor) ^(flange))} and a torque vector {right arrow over(T_(sensor) ^(flange))} in the robot tool flange coordinate system:

$\begin{matrix}{\overset{\rightarrow}{F_{sensor}^{flange}} = \begin{pmatrix}F_{x,{sensor}}^{flange} \\F_{y,{sensor}}^{flange} \\F_{z,{sensor}}^{flange}\end{pmatrix}} & {{eq}.1}\end{matrix}$

where F_(x,sendor) ^(flange) is the indicated force along the x_(flange)axis, F_(y,sensor) ^(flange) is the indicated force along the y_(flange)axis and F_(z,sensor) ^(flange) is the indicated force along thez_(flange) axis.The torque can be indicated as a torque vector in the robot tool flangecoordinate system:

$\begin{matrix}{\overset{\rightarrow}{T_{sensor}^{flange}} = \begin{pmatrix}T_{x,{sensor}}^{flange} \\T_{y,{sensor}}^{flange} \\T_{z,{sensor}}^{flange}\end{pmatrix}} & {{eq}.2}\end{matrix}$

where T_(x,sensor) ^(flange) is the indicated torque around thex_(flange) axis, T_(y,sensor) ^(flange) is the indicated torque aroundthe y_(flange) axis and T_(z,sensor) ^(flange) is the indicated torquearound the z_(flange) axis. It is noted that the force vector and torquevector can be provided as separate signals and that a separate forcesensor and/or torque sensor can be provided.

Robot tool joint 102 f may comprise the acceleration sensor 115providing an acceleration signal 225 indicating the acceleration of therobot tool flange where the acceleration may be indicated in relation tothe tool flange coordinate system

$\overset{\rightarrow}{A_{sensor}^{flange}} = \begin{pmatrix}A_{x,{sensor}}^{flange} \\A_{y,{sensor}}^{flange} \\A_{z,{sensor}}^{flange}\end{pmatrix}$

where A_(x,sensor) ^(flange) is the sensed acceleration along thex_(flange) axis, A_(y,sensor) ^(flange) is the sensed acceleration alongthe y_(flange) axis and A_(z,sensor) ^(flange) is the sensedacceleration along the z_(flange) axis.

In an embodiment where the acceleration sensor is provided as a combinedaccelerometer/gyrometer (e.g. an IMU) the acceleration sensor canadditionally provide an angular acceleration signal indicating theangular acceleration of the output flange in relation to the robot toolflange coordinate system, for instance as a separate signal (notillustrated) or as a part of the acceleration signal. The angularacceleration signal can indicate an angular acceleration vector {rightarrow over (α_(sensor) ^(flange))} in the robot tool flange coordinatesystem

$\begin{matrix}{\overset{\rightarrow}{\alpha_{sensor}^{flange}} = \begin{pmatrix}\alpha_{x,{sensor}}^{flange} \\\alpha_{y,{sensor}}^{flange} \\\alpha_{z,{sensor}}^{flange}\end{pmatrix}} & {{eq}.3}\end{matrix}$

where α_(x,sensor) ^(flange) is the angular acceleration around thex_(flange) axis, α_(y,sensor) ^(flange) is the angular accelerationaround the y_(flange) axis and α_(z,sensor) ^(flange) is the angularacceleration around the z_(flange) axis.

The force-torque sensor and acceleration sensor of the illustratedembodiment are arranged at the robot tool joint 102 f; however, it is tobe understood that the force-torque sensor and acceleration sensor canbe arrange at any part of the robot arm and in some embodiments beomitted.

The robot controller is switchable into a free-drive mode of operation,where the robot controller in the free-drive mode of operation isconfigured to:

-   -   maintain the robot arm in a static posture when only gravity 109        is acting on the robot arm;    -   allow change in posture of the robot arm when an external force        different from gravity is applied to the robot arm.

When only gravity is acting on the robot arm, the robot controller canbe configured to maintain the robot arm in a static posture by drivingthe joint motors at a state where they provide sufficient motor torqueto overcome gravity without moving parts of the robot arm. The robotcontroller can be configured to determine the sufficient motor torquebased on the dynamic model of the robot arm at the static posture. Thestatic posture can for instance be indicated by joint sensors providedas output encoders indicating the angular position of the output flangeand/or input encoders indicating the angular position of the motorshaft. The static posture can also be stored as a posture in the controlsoftware for instance by defining the joint angles of the robot jointsat the static posture. In case the static posture of the robot arm isstored, the stored posture may be referred to as a way point posture towhich the robot arm returns or moves to/through when operating in arobot program.

When an external force different from gravity is applied to the robotarm, the robot controller can allow change in posture by driving thejoint motors with a motor torque that allows a user to rotate the outputflanges of the robot joint. For instance, the robot controller can beconfigured to drive the motor with a motor torque sufficient formaintaining the robot arm in the static posture, and an additional forceand/or torque applied to the robot arm will thus overcome the sufficientmotor torque, whereby the output flange of the joints will rotate due tothe additional force and/or torque. During change of the robot armposture the robot controller can be configured to adjust the sufficientmotor torque based on the changes in posture resulting in the effectthat the robot arm will be maintained in the new static posture when theadditional external force is reduced.

In the free-drive mode of operation, the robot controller can in oneembodiment be configured to control the motor torque of the joint motorsbased on the force signal 224 from the force-torque sensor 114. Thismakes it possible for the user to move the tool flange withoutmanipulating each of the robot joints, for instance by pushing, pullingor rotating the robot tool flange. Additionally, in the free-drive modeof operation according to the present invention the user can also chooseto manipulate the individual robot joints to change the posture of therobot arm. Consequently, the user is provided with a larger flexibilityand options when changing the posture of the robot arm in free-drivemode of operation.

The robot controller 110 for controlling the robot arm 101 can beconfigured to perform the methods illustrated in FIG. 3-4 .

FIG. 3 illustrates a flow diagram of a method of controlling a robot armaccording to the present invention. The method comprises a step ofinitializing 330 comprising obtaining the dynamic model D_(robot) of therobot arm, which can be based on prior knowledge of the robot arm, KoR,such as the dimensions and weight of robot joints and robot links; jointmotor properties; information relating to an eventual payload attachedto the robot arm, orientation of the robot arm in relation to gravityetc. The dynamic model of the robot arm can be defined and pre-stored inthe memory of the controller and the user can in some embodiments beallowed to modify the dynamic model op the robot arm, for instance byproviding payload information of a payload attached to the robot arm ordefining the orientation of the robot arm in relation to gravity.

Step 340 is a step of evaluating user inputs to determine if the robotcontroller should change the current mode of operation to free-drivemode of operation. Step 341 is an optional step of changing the robotcontroller's current mode of operation to teach mode, if not already inteach mode, as in some embodiments the robot control can be configuredonly to enter free-drive mode of operation when in teach-mode ofoperation. However, it should be noted that free-drive mode of operationcould be entered from other current modes of operation such asrun/operation mode, however it would typically be entered from teachmode. In step 342 a user of the robot arm establishes a so-calledfree-drive activation signal for instance based on user inputs UI, andin step 345 it is determined if the process of activating the free-drivemode of operation of the robot arm should start (see step 350).Typically, the free-drive mode of operation is activated duringprogramming of the robot arm for instance in order to allow a user tomanually change the posture of the robot arm, e.g. in order to definewaypoints/postures of the robot arm during a robot program.

The free-drive mode of operation can be activated based on a user inputinstructing the robot controller to activate the free-drive mode ofoperation. Thus step 340 can receive a user input, UI activating thefree-drive mode of operation and enters the free-drive mode ofoperation, as indicated by a thumb up icon, if such user input isreceived and validated. If no user instructions to enter the free-drivemode of operation is received, the robot controller will, as indicatedby a thumb down icon, not enter to free-drive mode of operation. Theuser input can be received through any input device capable of receivinguser inputs for instance buttons, joysticks, touch screens, gesturerecognition devices, sliders, sensors on the robot arm, etc. In oneembodiment the free-drive mode of operation is activated based on aforce-torque signal resulting in the fact that the user can activate thefree-drive mode of operation directly at the robot arm simply byapplying a force and/or torque to the robot arm. For instance, theforce-torque signal can be provided as the force-torque signal 224provided by the force-torque sensor 114 attached to the robot toolflange of the robot arm illustrated in FIGS. 1-2 . Once the robotcontroller has entered the free-drive mode of operation (see step 360)the user input can indicate that the robot controller shall bring therobot arm out of free drive mode of operation. Bringing the robot armout of the free-drive mode can happen automatically upon expiry of adefined time period or based on user input UI.

As mentioned, in step 342 a user of the robot arm establishes aso-called free-drive activation signal. The free-drive activation signalis provided from the user to the robot controller by the user applying aforce to the robot arm or user interface. The force can be applied to abutton or touch screen of the user interface or to a joint or sensor ofthe robot arm. No matter how and where the force is applied to the robotarm or user interface, it establishes an input to the robot controllerreferred to as the free-drive activation signal.

In an embodiment, to activate free-drive mode of operation, thefree-drive activation signal has to be received continuously by therobot controller in a so-called activation period of time. Theactivation period of time is typically more than zero seconds andtypical less than 10-15 seconds, suitable duration depends on e.g. theuser, but would in many situations be between 0.25 second and 5 secondssuch as 0.25 second, 0.5 second, 1 second or 2 seconds. With this thetime period could be set to zero (or between zero and 0.25 second) ife.g. a simple comparison is made between two stored values of aparameter. Alternatively, the free-drive activation signal can bereceived by the robot controller as discrete signals in a predeterminedpattern. This is mainly to ensure that the free-drive activation signalis not established by mistake. Therefore, the period of time should belong enough to identify non-user activation as such and only registeractivation from a user.

In an embodiment the free-drive activation signal is a logic “1” or “0”provided by pushing a button of the user interface. In an alternativeembodiment the free-drive activation signal is a measured value of ajoint sensor parameter or a derivable hereof such as a force, torque,temperature, electric potential, etc. Accordingly, the type of jointsensor parameter needed to establish the free-drive activation signalmay be predetermined for the robot controller to be able to identify afree-drive activation signal. Alternatively, a specific input address ofan I/O module connected to the robot controller can be used to identifya free-drive activation signal.

In an embodiment, in step 342, the user applies a force to a robot jointor to a force sensor to establish the free-drive activation signal. Inthis embodiment the force may be applied by pushing the force sensor ina predetermined orientation in space. The predetermined orientation maye.g. be an orientation perpendicular or parallel to a joint axis 105 f.In case the predetermined orientation is perpendicular to the jointaxis, an angle of the perpendicular force applied may also beestablished. Establishing an angle for the applied force facilitates thepossibility for the robot controller to identify forces applied in apredetermined direction as potential free-drive activation signal. Asindicated, any movement in space could in principle be used however, thementioned perpendicular or parallel movements with respect to joint axis105 f is considered advantageous in that they are easier to remember andapply by a user.

Hence, it is possible not only to limit the free-drive activation signalto a specific type of joint sensor parameters, such as a force measuredby the force sensor, but also to a specific direction of such forcemaintained in a predetermined activation period of time. Establishingthe free-drive activation signal based on a force applied in thespecified direction in a predetermined activation period of time i.e.e.g. in an angle which may be defined relative to the robot base oranother part of the robot arm reduces the risk of the robot controllerconfuses forces not intended to establish the free-drive activationsignal from forces that is intended to establish the free-driveactivation signal.

An alternative method of establishing the free-drive activation signalis to apply a force in a direction which is not natural for theparticular robot arm. An example hereof could be if a force change ismeasured (increased or decreased) without any change of e.g. motorcurrent is applied by the robot controller and/or if no change isregistered in relation to the payload.

Yet another alternative method of establishing the free-drive activationsignal is to apply a torque to the torque sensor. Typically, a torquewould also be a none natural force e.g. if the robot arm is in a staticposture and where a static motor current applied to the motor. Suchtorque could be applied by a user using one or both hands to twist thetorque sensor.

In step 345, the measured value (magnitude/size) of the force or torqueapplied to the robot arm is compared to a predefined threshold value. Ifthe measured value is above the threshold value for the predeterminedactivation period of time, the robot controller is instructed toconclude, that a user is about to activate free-drive mode of operation.An additional test that may be performed in step 345 is if the directionof the measured force is as expected and/or if a value of a furtherjoint sensor parameter is below a further predetermined threshold value.

This further threshold may be lower than the first threshold in that itis expected that a user applying a force in many situations also willapply a small torque. Hence, if a relatively high force is applied atthe same time as a relatively small torque (or vice versa) it is anindication of an impact from a user. This can be evaluated by comparingthe measured values of both the force (joint sensor parameter) and thetorque (further joint sensor parameter) to respective threshold values.Thereby is established a further filter for ensuring that only a user'sintentional force applied are interpreted by the robot controller as athe free-drive activation signal.

Alternatively, if the first joint sensor parameter is a force in a firstdirection, then the further joint sensor parameter may be a forceapplied in a second direction which is different from the firstdirection.

The first and further thresholds are typically defined by an upper orlower value for e.g. the magnitude/size of the force/torque but couldalso be defined as ranges between to endpoints. An appropriate force tobe applied by a user to establish the free-drive activation signal couldbe below 50N such as e.g. 5N, 10N, 15N or 20N. The force has to be largeenough not to be confused by a bump caused e.g. by a user and smallenough for a user to be able to apply the force to the robot arm.

In step 350, the free-drive mode of operation is activated. In step 351,a so-called activation sequence period of time starts, in step 352, oneor more joint sensor parameters are measured and in step 355, changes ofthe values of the one or more joint sensor parameters are compared toallowable changes. Hence, if changes are within an allowable range forthe whole activation sequence period of time, the weight of the payloadis assumed to be correct and the free-drive mode of operation isactivated as indicated by thumb up and if not the robot controllerswitch to e.g. a non-freed-drive mode of operation such as protectivestop mode or stays in the current mode of operation as indicated bythumb down.

As mentioned, in step 351, the activation sequence period of timestarts. In an embodiment, this time period is between 0.25 second and 5seconds such as 0.25 second, 0.5 second, 1 second or 2 seconds. Withthis the the time period could be set to zero (or between zero and 0.25second) if e.g. a simple comparison is made between two stored values ofa parameter half a second and 10-15 (or even more) seconds. If one ormore joint sensor parameters does not within this period of time changemore than allowed, free-drive mode of operation is entered.

The allowed changes may be defined by free-drive activation joint sensorparameter threshold values defining maximum speed, acceleration,displacement, position, force, torque, current, etc. These thresholdvalues may be predetermined fixed values. However, they may also bedynamic in the sense that if e.g. acceleration of the robot arm in theactivation sequence period of time is high, a threshold value for e.g.displacement of the robot arm or the time such acceleration is allowedis low whereas if the acceleration is low, the threshold value for thedisplacement or time is higher.

The free-drive activation joint sensor parameter threshold values maydefine a so-called virtual wall or virtual window defining a rangearound the center of the tool flange within which the tool flange isallowed to move; for instance, a plane in an orientation in space, acube, sphere or other 3d shape. In case of e.g. a payload weight error,the robot tool flange (or payload) may move downward until it “hits” thevirtual wall where it will stop and e.g. enter normal mode operation.The virtual wall can be reset so to speak by a user e.g. moving(lifting, lowering, displacing) the tool flange a predetermineddistance. The user can for instance move the robot tool flange apredetermined distance away from the virtual window. By this, thevirtual wall is reestablished now relative to the new position of thecenter of the tool flange. By applying an external force e.g. by moving(lifting, lowering, displacing) the tool flange the robot controllerknows that it is a user applied force and therefore it is allowed toreestablish the virtual wall. In this way the tool flange can be moveddown to the floor of the robot cell in subsequent steps. If the virtualwall was reached e.g. because the payload falls off a gripper tool, thegripper would hit the upper part of the virtual wall and stay there, asthe robot arm in free-drive mode of operation tries to compensate forgravity's influence on the “missing payload”, and the virtual wall wouldnot be reestablished. In the latter example, if there were no virtualwall, the gripper would risk stopping first, when it hits its upperposition e.g. standing upwardly in a straight pose. The user can thenmove the tool flange down to the floor of the robot cell in subsequentsteps by lowering the tool flange whereby the controller establishes anew virtual wall. Opposite if the payload weighs more than known by therobot controller, the robot tool flange would move downward in thedirection of gravity until it hits its lower position or the floor ofthe robot cell. This can be prevented by the virtual window, as thegripper would hit the lower part of the virtual wall and stay there, andthe virtual wall would not be reestablished. The user can then move thetool flange to a desired position in subsequent steps by lifting thetool flange away from the lower part of the virtual window, whereby thecontroller establishes a new virtual wall.

The joint sensor parameter thresholds could be dynamic depending ondifferent aspects of movement of the robot arm. Hence, maximum speedcould be depending on time since movement started. I.e. if the robot armhas moved in substantially the same direction for more than x seconds,then maximum speed threshold is reduced to avoid drifting of the robotarm.

Further, the payload could define threshold value for speed andacceleration. I.e. if the user has registered a large payload (size orweight) the maximum speed and/or acceleration threshold is reduced toprevent the user in getting hazardous situations or to help maneuver aheavy robot.

Speed and acceleration could be limited by the force applied to therobot by the user (or payload). I.e. if the user pulls hard in the robotor the payload change weight, the robot could be limited to slowmovements to protect user and/or payload. The same is true for torque,hence if the robot experiences large torque, the maximum angular speedcould be reduced to prevent an off-axis payload facilitates unexpectedfast rotation/acceleration of the tool flange.

Therefore, in step 352 values of one or more predetermined joint sensorparameters are obtained or established. Joint sensor parameters may asmentioned include speed, acceleration, torque, motor torque, force, etc.but also derivable hereof such as position and displacement of the robotarm in space. In an embodiment, the force and torque are measured at thetool flange. Further output from accelerometers received over time froma plurality of joints are used to calculate or derive angular speed,angular acceleration, speed and/or acceleration of the tool flange.Further current and/or voltage is measured in a plurality of joints e.g.the power supply to the joint motors.

Despite the intension of the free-drive mode of operation, the value ofthese joint sensor parameters and derivables hereof may change withoutadditional force (additional motor torque T_(additional)) is applied tothe robot arm by a user if e.g. the weight of the payload is notcorrect, sensors are not calibrated correct or sensors are drifting overtime. Hence, one problem solved by the present invention is thatmeasurements from sensors such as force torque sensors are drifting overtime or as consequence of temperature changes and can therefore not betrusted. Instead, unexpected (from the robot controllers' point of view)measurements from torque/force sensors are more trustworthy.

As an example, could be mentioned that if the weight of the payload islower than the weight provided to the robot controller (e.g. by a user),the static motor torque (T_(static)) calculated by the robot controllerto maintain a static posture is too high leading to an upward movementof the robot arm. To avoid such movement to cause damage on material orpersons, the robot controller in this situation stops the movement ofthe robot arm. Stop can be initiated e.g. by changing mode of operationto a protective or hard stop mode. In step 350, the stop is made withinthe activation sequence period of time and hence, free-drive mode ofoperation is not entered.

Alternatively, it can be done by compensating for the movement byreducing motor current to one or more joint motors until static postureof the robot arm is registered e.g. via joint sensor parameters.

It should be mentioned, that in some embodiments the joint/force sensorsmay only indicate the force applied by a user intending to enterfree-drive mode and not register that force directly. For instance, adifference in encoder positions between input encoder and out encodermay be used to indicate than an external force is applied to the robotarm.

The evaluation of the measured joint sensor parameters is made in step355. As mentioned, the evaluation may be implemented as a comparison ofmeasured values of the joint sensor parameters to free-drive activationjoint sensor parameter threshold values defining allowable changes ofthe measured values. As mentioned, these free-drive activation jointsensor parameter threshold values may be predetermined fixed values,however they may also be implemented as dynamic values and changed inresponse to e.g. speed of change of the values of the measured jointsensor parameters. By this evaluation, it is ensured that the free-drivemode of operation is only entered if this will not cause the robot armto move with values of joint sensor parameters or derivables hereofoutside the free-drive activation joint sensor parameter thresholdvalues which could lead to hazardous situations for the user, the robotarm and its surroundings. A positive evaluation leading to change ofmode of operation to free-drive mode of operation is indicated by thethumb up and a negative evaluation leading to e.g. staying in thecurrent mode of operation (typically teach mode) or protective stop isindicated by thumb down.

In step 360, the robot arm is operated in the free-drive mode ofoperation and it is therefore possible for the user to manipulate theposture of the robot arm by applying a force to one or more parts of therobot arm.

In step 361, upon the positive evaluation described above leading tochange of mode of operation into free-drive mode of operation, afree-drive period of time is started by the robot controller. In step362, it is tested if the user manipulates the robot arm. If the userdoes not manipulate the robot arm, then after expiry of the free-drivemode period of time, the robot controller changes mode of operation to anon-free-drive mode of operation. In an embodiment, the mode ofoperation changes back to teach mode.

If, however the user does some manipulation of the robot arm, in step363, the robot controller resets the free-drive mode period of time orif a different period of time is desired starts a restart free-drivemode period of time. Manipulation here includes registering a positionsuch as a way point. Note that FIG. 3 illustrates an embodiment where arestart free-drive mode period of time is started, without excluding anembodiment where the free-drive mode period of time is simply reset.Again, in step 364, it is tested if the user manipulates the robot arm.If the user does not manipulate the robot arm, then after expiry of therestart free-drive mode period of time, the robot controller changesmode of operation.

The free-drive period of time and the restart free-drive period of timemay be equal in length i.e. they may both be e.g. 3 seconds. Typically,these time periods are in the range of 0.5 second to 15 seconds, oftenin the range of 1 second to 5 seconds and often 2, 3 or 4 seconds. Withthis, as mentioned, these periods do not have to be equal in length.

After a change of mode of operation e.g. to stop or teach mode, then ifthe user desires to enter free-drive mode of operation again, he is tojump to step 342 again and establish the free-drive activation signal.It should be mentioned that it may require a reset or restart of therobot arm, if the robot arm has been in a stop mode of operation.

FIG. 4 illustrates one embodiment of a step 460 of running the robot armin free-drive mode of operation and comprises a step 466 of obtaining astatic motor torque T_(static) keeping the robot arm in a staticposture, a step 467 of obtaining an additional motor torqueT_(additional) e.g. applied from a user, a step 468 of combining thestatic motor torque and additional motor torque into a combined motortorque T_(combined), and a step 469 of controlling the joint motor basedon the combined motor torque.

The static motor torque T_(static) obtained in step 466 can be obtainedbased on the actual posture of the robot arm P_(robot) and the dynamicmodel of the robot arm D_(robot), where the dynamic model of the robotarm defines a relationship between the posture of the robot arm and themotor torque needed to maintain the robot arm in a static posture underinfluence of gravity. The static motor torque indicates the motor torquethat the joint motors need to provide in order to keep the robot arm ina static posture under influence of gravity. The actual posture of therobot arm P_(robot) can be obtained based on joint output encodersindicating the angular position of each of the output flanges of therobot joints and the static motor torque T_(static) can be provided as avector or array where the static motor torque T_(static),n for each ofthe joint motors are provided, where n indicate the number of the robotjoint with the robot motor that shall provide the obtained n^(th) staticmotor torque. Driving the motor joint with currents generating thestatic motor torque results in the effect that the robot arm is kept ina static posture when it is only influenced by gravity. A user may moveparts of the robot arm by manipulating the robot joints for instance bypushing, pulling and/or rotating parts of the robot arm whereby anexternal force/torque is applied to the robot arm. If such externalforce/torque exceeds the static motor torque of the robot joints, thejoint motors will not be able to prevent modification of the robot armposture and the user can thereby change to posture of the robot arm.

The additional motor torque T_(additional) obtained in step 467 isobtained based on the force-torque FT_(flange) provided to the toolflange and indicated by the force-torque sensor 114, the dynamic modelof the robot arm D_(robot) and the actual posture of the robot armP_(robot). The force-torque FT_(flange) is provided by the force-torquesensor at the robot tool flange. The additional motor torque indicatesthe motor torque that the joint motors need to provide to move and/orrotate the robot tool flange in response to the force/torques providedto the robot tool flange and obtained by the force-torque sensor. Forinstance, a force provided in a given direction to the robot tool flangemay result in a movement of the robot tool flange in that direction andthe size of the force may indicate the desired acceleration of themovement. Similar, a torque provided in a given direction to the robottool flange may result in a rotation of the robot tool flange in thedirection of the torque and the size of the torque may indicate thedesired angular acceleration of the rotation. The additional motortorque T_(additional) can be provided as a vector where the additionalmotor torque T_(additional,n) for each the joint motors is provided,where n indicate the joint number of the robot motor that shall providethe obtained static motor torque. Driving the motor joint with currentsgenerating the additional motor torque results in the effect that therobot tool flange can be moved and/or rotated in the direction of theforce and/or torque provided to the robot tool flange. In theillustrated embodiment the additional motor torque indicates the motortorques that in addition to the static torques needs to be provided inorder to move the robot arm.

The combined motor torque T_(combined) obtained in step 468 is obtainedby combining the static motor torque T_(static) and the additional motortorque T_(addition) into a combined motor torque T_(combined). In thisembodiment this is achieved by adding the static motor torque and theadditional motor torque:

T _(combined) =T _(static) +T _(additional)  eq. 4

Consequently, the combined motor torque T_(combined) indicate the totalmotor torques that need to be provide by the joint motors to bothovercome gravity and move/rotate the robot tool flange based on theforce-torques provided to the robot tool flange.

The step of controlling the joint motor based on the combined motortorque comprises providing a number of control signals to each of thejoint motors indicating the motor torque of each joint motorT_(motor,n), where n indicate the joint number of the robot motor thatshall provide the motor torque. The motor torque of the joint motor maybe regulated by varying the current through the joint motor as known inthe art of motor regulation.

As described above in step 361, the free-drive period of time is startedwhen the user stops manipulating the robot arm and in step 362, it isevaluated if the user manipulates the robot arm. If the user does notmanipulate the robot art before expiry of this time period, the robotcontroller changes mode of operation indicated by thumb down. If on theother hand, the user manipulates the robot arm, the robot controllerjumps to step 466 for changing posture of the robot in response to forceapplied by the user.

Further, as long as the robot arm is operated in the free-drive mode,the robot controller evaluates joint sensor parameters or derivableshereof. This evaluation is not illustrated in FIG. 3 or FIG. 4 . Thisevaluation is similar to the evaluation described in relation to step350 i.e. if the robot arm performs unexpected movements such as amovement not initiated by a force applied by a user. A movement notinitiated by a user will typically be in the vertical plane in thatgravity will pull in the payload if e.g. the force sensor drifts overtime or payload weight change over time (if e.g. the payload issensitive to temperature changes or part of the payload is used orremoved). If e.g. the payload falls off a gripping tool, the robotcontroller will move the tool flange upward. This is advantageous inthat should the payload fall off; this evaluation will ensure that therobot controller change mode of operation e.g. to a stop mode.

The speed of movement of the robot arm in the free-drive mode ofoperation is limited in vertical orientations to ensure that in case apayload is dropped, the robot arm speed does not accelerate. However, inhorizontal orientations a dropped payload will not influence the speedof the robot arm, which is therefore less restrictive compared to speedin vertical orientations.

Deactivation of the free-drive mode of operation can be made eithersimply by letting the free-drive period of time expire, by pushing abutton, exceeding a joint parameter threshold such as speed oracceleration, etc.

The joint sensor parameters are used as an indicator of movement of therobot arm. Accordingly, any sensor value or values derived based oninput to the robot controller can be seen as a joint sensor parameter.Joint sensor parameters therefore include information of at least speed,acceleration, torque, motor torque, force and position. In an embodimentof the invention, movement of the tool flange and thereby the robot armis checked based on the joint encoders. The joint encoders include bothan input encoder indicating the angular position of the joint motorshaft and an output encoder indicating the angular position of theoutput flange (thus after the gear). As indicated, movement of the toolflange and thereby the robot arm can also be indicated or derived frominput from one or more joints such as from an accelerometer 115, currentsensor and the like.

The robot arm may be controlled in different modes of operation. Whenprogrammed, the robot arm may be operated in teach mode, whenprogramming is completed, the robot arm may be operated in run mode andwhen violating safety functions, the robot arm may enter a stop mode.The user may activate free-drive mode from any of these modes ofoperation, however with this the current mode of operation of the robotarm before entering the free-drive mode of operation is typically theteach mode of operation.

In an embodiment, predefined areas of allowed operation in thefree-drive mode of operation may be defined. Such areas may be used toprotect the robot arm from collision with physical objects, defineworking space, etc. Operated in the free-drive mode of operation, therobot controller may communicate to the user that the robot arm isgetting close to a border of such area. Such information may becommunicated visually to the user via the user interface. Alternatively,it may be communicated to the user by increasing the motor current andthereby the motor torque provided by the joint motor so that the userwill experience a resistance from the robot arm when continuing applyingthe manipulating force resulting in a movement of the robot arm towardsthe border.

An alternative way of communicating from the robot controller to theuser is by so-called haptic feedback. Haptic feedback may be used by therobot controller e.g. to inform the user that the free-drive mode ofoperation is entered, that a border is getting close, etc. The hapticfeed-back may be presented as different sequences or patterns for theuser to be able to distinguish the meaning of the haptic feedbacksignals from each other. If the haptic feedback is used, it is preferredto not “vibrate” (change position) of joints between the same twopositions for a longer period. The duration of the period should notcause lubricant between balls of a ball bearing to not lubricate theballs. Hence, if haptic feedback is required for a period of time longerthan the this can be prevented, it would be preferred to move the robotarm a bit first in one direction and later back in the other directionso that at the end the robot arm is in its starting position to ensurelubrication of the balls.

The graphic user interface is in an embodiment implemented as a screenof the teach pendant. Via this interface, the user is able tocommunicate with the robot controller and the robot controller is ableto communicate with the user. One piece of information which the robotcontroller may communicate to the user is time left of the differentperiods of time described above. Hence from an area of the screen, therobot controller may count down or up the activation period of time, theactivation sequence period of time, the free-drive period of time, therestart free-drive period of time, etc. Because of this, the user isalways from a look at the screen informed of time left of a period oftime. The screen or display may be divided into segments intended forcommunication of different aspects of e.g. movement of the robot arm. Avisualization of posture of the joints, location of robot tool e.g.relative to a virtual wall and how to move the robot tool back on thecorrect side of such wall just to mention some of the functions of thegraphic user interface.

Further, the robot controller may via the interface device present tothe user root cause to events leading to involuntary leaving thefree-drive mode as well as guidance on how to (e.g. which joints to movehow) get the robot arm back in a starting position, posture or desiredlocation/orientation in space.

Further, an unintentional event occurs that would satisfy requirementsto activate free-drive mode of operation and bring the robot controllerin free-drive mode could occur. To avoid that such event does notrepeatably makes the robot controller enter free-drive mode, a timeperiod may be introduced that needs to expire before the robotcontroller can enter free-drive mode again.

From the above it is hereby clear that the change of mode of operationfrom a current mode of operation to the free-drive mode of operation ismade in a safe manner ensuring that e.g. errors in payload weightinformation comprised by the robot controller does not result hazardoussituations. This problem is solved by a user establishing a free-driveactivation signal such as a force above a corresponding threshold value.In an embodiment continuously for an activation period of time. By thistest, it is ensured, that the user's intension is to enter free-drivemode.

Subsequently, the robot controller switches mode of operation typicallyfrom normal mode of operation to free-drive mode. Initially uponentering the free-drive mode of operation, one or more joint sensorparameter values are monitored for an activation period of time andcompared to corresponding threshold values. By this test, it is ensured,that the weight of the payload is correct. If not correct, one or moreof the monitored joint sensor parameter values will exceed thecorresponding threshold values. In case this happens, the robotcontroller will change mode of operation e.g. to a stop mode ornon-free-drive mode of operation. If correct, the user is then able tomove/manipulate the robot arm as desired in the free-drive mode ofoperation.

If the user does not apply a force to the robot arm in a givenfree-drive period of time/restart free-drive period of time, the robotcontroller interprets this as a wish from the user to switch back toteach mode (or another mode).

A further problem solved by the present invention is that it is possibleto use both hands when changing posture (sometimes referred to asmanipulating, moving or applying a force) of the robot arm. This isadvantageous e.g. in the situation where a robot tool has to bepositioned very precise e.g. a screwing tool above a screw or where therobot arm is physically to large and heavy to manipulate with only onehand.

A further problem solved by the present invention is that if the forceand torque sensor has drifted and therefore is providing wronginformation to the robot controller related to the weight of thepayload, no unexpected hazardous movements of the robot arm will happenoutside the defined threshold values.

In an embodiment of the invention a time period is started when a forceabove a force threshold is registered by the torque/force sensor (jointsensor), wherein the force is categorized as an intentional impact forceif the registered force maintains above the force threshold for adetermined force period of time and the torque registered by thetorque/force sensor remains below a torque threshold for a determinedtorque period of time.

This is advantageous in that it has the effect, that unintentionalimpact forces can be sorted out. This is because intentional impactforces provided by e.g. a human is provided without an accompanying orlimited torque. This is in contrary to a unintentional impact force e.g.from a collision or holding operation, where the force/torque sensorwill register a twist and thereby a torque. Hence, no matter in whichmode of operation the robot arm is operating, it is able to register anintentional impact force and based hereon e.g. change mode of operation,state of software program, be prepared to receive certain input, etc.

In an embodiment, the robot controller and the user communicate viaapplied force and robot feedback and based here on the robot controllerenter the free-drive. First, the user applies an external force to therobot arm. The external force applied can be any type of force appliedin any orientation in space. Hence, when the robot controller operatesthe robot arm e.g. in normal mode of operation and the user applies aforce e.g. in a predetermined orientation in space such as perpendicularto the joint axis 105 f. The direction or strength of the force providedby the user does not need to be know by the robot controller. Uponregistering the external force, the robot controller will provide arobot feedback as a response. The robot feedback can be haptic feedbackand when the user observes such haptic feedback, the user applies apredetermined force in a predetermined pattern or strength to the robotarm.

This predetermined force is known by the robot controller and if a matchexists between the applied predetermined force detected by the robotcontroller and the expected predetermined force the robot controllerdetermines that a user intentionally wishes to enter free-drive mode andis therefore changing mode of operation to free-drive mode.

The predetermined force applied by the user may be a simple force in acertain direction for a certain period of time. It just has to be knownby the robot controller and thereby be predetermined. Predeterminedforce in this embodiment should be understood as a pattern, sequence ofmoves of robot joints, etc.

The robot feedback may be provided immediately after the external forceis registered but could also be provided within 0.5 second to 5 secondssuch as e.g. 1, 1,5, 2 or 2.5 seconds from when the external force isregistered. Similarly, the predetermined force may be providedimmediately after the robot feedback is provided but could also beprovided within 0.5 second to 5 seconds such as e.g. 1, 1,5, 2 or 2.5seconds from when the robot feedback is provided. These time periods aredetermined based on what is convenient for the user and to ensure thatan unintentional external force similar to the predetermined force,applied e.g. 1 minute after the robot feedback is stopped would notinitiate a change to free-drive mode of operation. In this embodiment ofthe invention, where robot and user “communicate”, the activationsequence period of time is preferably set to zero or close to zeroseconds i.e. below 1 second. This has the effect that uncontrolledmovement of the robot arm during the activation sequence period of timee.g. due to wrong registration of payload weight in the robot controlleris reduce or completely eliminated.

Finally, it should be noted that the applied force, could be a forceapplied to one or more different input devices on the interface device.Such input devices could be buttons, microphones, touch screen,accelerometers/gyros, etc.

BRIEF DESCRIPTION OF FIGURE REFERENCES

-   101: robot arm;-   102 a-102 f: robot joint-   103: robot base-   104: robot tool flange-   105 a-105 f: robot joints axis-   106 a-106 f: rotation arrow of robot joints-   107: robot tool flange reference point-   108: base reference point-   109: Direction of gravity-   110: Robot controller-   111: interface device-   112: display-   113: input device-   114: force-torque sensor-   115: acceleration sensor-   216 a, 216 b, 216 f: output flange-   217 a, 217 b, 2179 f: joint motors-   218 a, 218 b, 218 f: output axle-   219 a, 219 b, 219 f: joint sensor-   220 a, 220 b, 220 f: joint sensor signal-   221: processor-   222: memory-   223 a, 223 b, 223 f: motor control signals-   224: force-torque signal-   225: acceleration signal-   330: initializing-   340: evaluating user inputs-   341: normal mode-   342: free-drive mode signal-   345: activate free drive?-   350: activating free-drive-   351: start activation sequence period of time-   352: establish joint sensor parameters-   355: joint sensor parameters are compared to allowable changes-   360, 460: free drive mode of operation-   361: start free drive period of time-   362: user manipulates the robot arm-   363: start a restart free-drive mode period of time-   364: user manipulation within time?-   466: obtaining a static motor torque-   467: obtaining an additional motor torque-   468: combining the static motor torque and additional motor torque-   469: control joint motors based on combined torque

1. A robot controller for controlling a robotic arm, the robotcontroller for switching the robotic arm between a first mode ofoperation and a free-drive mode of operation, where, in the free-drivemode of operation, the robotic controller is configured to performoperations comprising: keeping the robotic arm in a posture that isstatic when only gravity acts on the robotic arm; and allowing a changein the posture of the robot arm when an external force different fromgravity is applied to the robotic arm; wherein the robot controller isconfigured to switch the robotic arm to the free-drive mode of operationin response to a free-drive mode signal, where, in the free-drive modeof operation, the robot controller is configured to perform operationscomprising: monitoring a value of at least one parameter of at least onesensor associated with a joint of the robotic arm; and comparing thevalue of the at least one parameter to at least one threshold value;wherein the robot controller is configured to keep the robotic arm inthe free-drive mode of operation when the value of the at least oneparameter does not exceed the at least one threshold during a free-drivesafety period; and wherein the at least one threshold value is based ona virtual three-dimensional geometric shape surrounding a part of therobotic arm.
 2. The robot controller of claim 1, wherein, in thefree-drive mode of operation, the robot controller is configured to fixa position of the virtual three-dimensional geometric shape in relationto a reference point.
 3. The robot controller of claim 2, wherein therobot controller is configured to define the position of the virtualthree-dimensional geometric shape based on a position of the part ofsaid robotic arm in relation to the reference point.
 4. The robotcontroller of claim 3, wherein, during the free-drive mode of operation,the robot controller is configured to redefine the position of thevirtual three-dimensional geometric shape in relation to the referencepoint.
 5. The robot controller of claim 1, wherein the robot controlleris configured to define the position of the virtual three-dimensionalgeometric shape in relation to a reference point based on a plurality ofpositions of the of the robotic arm in relation to a fixed point, wherethe plurality of positions of the part of the robotic arm have beenobtained at different points in time.
 6. The robot controller of claim1, wherein the robot controller is configured to provide feedback to auser upon determining if the value of the at least one parameter iswithin a feedback value relating to the virtual three-dimensionalgeometric shape.
 7. The robot controller of claim 6, wherein thefeedback comprises a force provided by a part of the robotic arm, wherethe force is in a direction away from the virtual three-dimensionalgeometric shape.
 8. The robot controller of claim 7, wherein a size ofthe force increases as the value of the at least one parameterapproaches the virtual-dimensional geometric shape.
 9. A robotic armcomprising joints connecting a base and a tool flange, each of the robotjoints comprising: an output flange rotatable in relation to a robotjoint body; a motor configured to rotate the output flange; and at leastone sensor for providing a sensor signal indicative of at least one ofan angular position of the output flange, an angular position of a shaftof the motor, or a current of the motor; wherein the robotic armcomprises at least one robot controller of claim 1 configured to controlthe joints by controlling motor torque provided by one or more motorsbased on one or more sensor signals.
 10. A method of operating a roboticarm in a free-drive mode of operation, where the robotic arm has beenswitched into the free-drive mode of operation by a robotic controllerin response to receiving a free-drive activating signal set by a user,where the free-drive mode of operation comprises: keeping the roboticarm in a posture that is static when only gravity acts on the roboticarm; changing the posture of the robotic arm when an external forcedifferent from gravity is applied to the robotic arm; monitoring a valueof at least one parameter associated with a sensor of a joint on therobotic arm; comparing the value of the at least one parameter to atleast one threshold value; wherein the at least one threshold value isbased on a virtual three-dimensional geometric shape surrounding a partof the robotic arm; and keeping the robotic arm in the free-drive modeof operation when the value of the at least one parameter does notexceed the virtual three-dimensional geometric shape within at afree-drive safety period.
 11. The method of claim 10, furthercomprising: fixing a position of the virtual three-dimensional geometricshape in relation to a reference point following receipt of thefree-drive mode signal.
 12. The method of claim 11, further comprising:during the free-drive mode of operation, redefining the position of thevirtual three-dimensional geometric shape in relation to the referencepoint.
 13. The method of claim 10, further comprising: providingfeedback to the user when the value of the at least one parameter iswithin a feedback value relating to the virtual three-dimensionalgeometric shape.
 14. The method of claim 13, wherein providing feedbackto the user comprises a providing a force using at least a part of therobotic arm, where the force is in a direction away from thevirtual-dimensional geometric shape.
 15. The method of claim 14, whereinproviding the force comprises increasing the force as the value of theat least one or parameter approaches the virtual-dimensional geometricshape.
 16. A system comprising a robotic arm, the system comprising: abase; a tool flange; joints connecting the base and the tool flange,each of the joints comprising: an output flange rotatable in relation toa body of a joint; a motor configured to rotate the output flange; andat least one sensor for providing a sensor signal indicative of at leastone of an angular position of the output flange, an angular position ofa shaft of the motor, or a current of the motor; and at least one robotcontroller configured to control the joints by controlling motor torqueof one or more motors based on one or more sensor signals, the at leastone robot controlling being configured to perform operations comprising:monitoring a value of at least one parameter of at least one sensorassociated with a joint of the robotic arm; and comparing the value ofthe at least one parameter to at least one threshold value; wherein therobot controller is configured to keep the robotic arm in a free-drivemode of operation when the value of the at least one parameter does notexceed the at least one threshold during a free-drive safety period;wherein the at least one threshold value is based on a virtualthree-dimensional geometric shape surrounding a part of the robotic arm;and wherein in the free-drive mode of operation, a posture of therobotic arm is changeable through application of force to the roboticarm and where, in the absence of the force, the at least one robotcontroller is configured to maintain a posture of the robotic arm. 17.The system of claim 17, wherein, in the free-drive mode of operation,the robot controller is configured to fix a position of the virtualthree-dimensional geometric shape in relation to a reference point. 18.The system of claim 17, wherein the robot controller is configured todefine the position of the virtual three-dimensional geometric shapebased on a position of the part of said robotic arm in relation to thereference point.
 19. The system of claim 18, wherein, during thefree-drive mode of operation, the robot controller is configured toredefine the position of the virtual three-dimensional geometric shapein relation to the reference point.
 20. The system of claim 16, whereinthe robot controller is configured to define the position of the virtualthree-dimensional geometric shape in relation to a reference point basedon a plurality of positions of the of the robot arm in relation to afixed point, where the plurality of positions of the part of the robotarm have been obtained at different points in time.